Copyright: Copyright © 1995- 1996 David Berneda


!TChart Component Properties (by Group)
TChart Component Properties (by Group)

Axis control:

AxisVisible 	Boolean 	Show / Hide the chart axis.

BottomAxis 	TChartAxis 	The horizontal bottom axis.

LeftAxis 	TChartAxis 	The vertical left axis.

RightAxis 	TChartAxis 	The vertical right axis.

TopAxis 	TChartAxis 	The horizontal top axis.

3d Related:

Chart3dPercent 	Integer 	3d effect percent proportion.

View3d 	Boolean 	Show or hide the 3d effect.

View3dWalls 	Boolean 	Show or hide the 3d walls.

General properties:

AllowPanning 	TPanningMode 	Controls Right mouse button scrolling.

AllowZoom 	Boolean 	True to left mouse button zooming.

BackColor 	TColor 	The color used to fill the rectangle containing the Chart.

BackImage	TPicture	Assign an image as background to the chart.

BackImageInside	Boolean	Restricts an image to display inside the chart frame.

BackImageMode 	TTeeBackImageMode Decides how the chart background will display.

BufferedDisplay 	Boolean 	True means no flickering when drawing.

CancelMouse	Boolean	Toggles mouseclick sensitivity for zoom.

ClipPoints 	Boolean 	Shows/Hides points outside bounds.

TChartPen 	The chart frame.

Monochrome 	Boolean 	Draw the chart in monochrome (black and white) mode.

MonochromePrint 	Boolean 	Print the chart in monochrome mode.

OriginalCursor 	TCursor 	Returns original chart cursor.

Chart Legend:

Legend 	TChartLegend 	The Legend subcomponent.

Margins:

MarginBottom 	Integer 	The bottom chart margin percent.

MarginLeft 	Integer 	The left chart margin percent.

MarginRight 	Integer 	The right chart margin percent.

MarginTop 	Integer 	The top chart margin percent.

Series List:

SeriesList 	TChartSeriesList 	The chart Series.

Chart Title and Foot:

Title 	TChartTitle 	The top chart banner.

Foot 	TChartTitle 	The bottom chart banner.

Automatic Chart Paging:

MaxPointsPerPage 	Longint 	Maximum number of points per Page.

Page 	Longint 	The current Chart Page number.

NumPages 	Longint 	The total number of Pages.

See also:

TChart Component Reference

TChart public Methods

TDBChart Component Reference

List of Series Components


Canvas Property

Applies to

TChart, TDBChart components

Declaration

property Canvas : TCanvas;

Description

Do not use Canvas if BufferedDisplay is True.


About TeeChart...

Installation

TeeChart charting components have been written in Delphi by David Berneda. They are 100% Delphi Native VCL compliant. TeeChart products are distributed and supported by TeeMach SL. of Barcelona, Catalonia, Spain.

Please email the following address for questions:

email address: teechart@redestb.es

or 101600.1067@compuserve.com

www: http://ourworld.compuserve.com/homepages/dberneda

Address:

TeeMach SL.

Gran Via 533

08011 BARCELONA

CATALONIA, (Spain)

Fax: +34 3 454-29-39


Active Example

PointSeries1.Active:=not PointSeries1.Active;


Active Property

See also	Example

Applies to

TChartSeries component

Declaration

property Active : Boolean;

Description

The Active property shows or hides the TChartSeries. It can be changed both at design time or runtime. When hiding, all point values are preserved, so there's no need to refill the values again when showing. The Series relatives chart axis are rescaled in order to accomodate changes.


ActiveSeriesLegend Method

Applies to

TChart, TDBChart components

Declaration

function ActiveSeriesLegend(SeriesIndex : Longint) : TChartSeries;

Description

The ActiveSeriesLegend function returns the nth Active Series.

If all Series are Active, calling then the above function is the same as using the Chart1.Series property.


Add Example

With Series1 do

Begin

    Add(  40, 'Pencil' , clRed ) ;

    Add(  60, 'Paper',  clBlue ) ;

    Add(  30, 'Ribbon', clGreen ) ;

end;


Add Method

See also	Example

Applies to

TChartSeries component

Declaration

function Add(Const AValue:Double; Const ALabel:String; AColor:TColor):Longint; virtual;

Description

The TChartSeries Add method can be used to insert new Series points when you do not have an X Value for the point.

This function inserts a new point in the Series. The new point only has Y values. X value is automatically calculated.

The AXLabel parameter is optional (can be empty '').

The AColor parameter is optional (can be clTeeColor).

The function returns the new point position in the Values list.


Add See also
See Also

TChartSeries.AddY


AddArrow Example

This code fills an ArrowSeries with two random arrows:

var

x0,y0,x1,y1 : Double;

begin

ArrowSeries1.StartXValues.DateTime:=False;

ArrowSeries1.EndXValues.DateTime:=False;

ArrowSeries1.Clear;

x0 :=Random( 1000 );

y0 :=Random( 1000 );

x1 :=x0 + Random( 1000 ) - 500 ;

y1 :=y0 + Random( 1000 ) - 500 ;

ArrowSeries1.AddArrow( x0, y0, x1, y1, '', clBlue);

x0 :=Random( 1000 );

y0 :=Random( 1000 );

x1 :=x0 + Random( 1000 ) - 500 ;

y1 :=y0 + Random( 1000 ) - 500 ;

ArrowSeries1.AddArrow( x0, y0, x1, y1, '', clYellow);

end;


AddArrow Method

See also	Example

Applies to

TArrowSeries component

Declaration

function AddArrow(Const X0, Y0, X1, Y1: Double; Const ALabel: String; AColor: TColor): Longint;

Description

The AddArrow function adds a new arrow point to the Series. Returns the position of the Arrow in the list. Positions start at zero.

Each arrow is made of 2 points:

(X0,Y0)   The starting arrow point.

(X1,Y1)   The arrow head end point.


AddArrow See also
See Also

TArrowSeries.StartXValues

TArrowSeries.StartYValues

TArrowSeries.EndXValues

TArrowSeries.EndYValues


AddBar Method (TBarSeries)
AddBar Method

See also	Example

Applies to

TBarSeries component

Declaration

function AddBar(Const Value: Double; Const Text: String; Color: TColor) : Longint;

Description

*Important The AddBar Method has been maintained only for this version of TeeChart to help those migrating from previous versions of TeeChart. The AddBar method calls the Add method. For those of you writing new code please use the Add method. The AddBar method will be removed in the next version of TeeChart.

The AddBar method appends a new Bar to the Series Points List. The Bar point is assigned the Value, Text and Color parameters. You can specify clTeeColor as Color parameter to draw it using a predefined color. The Text parameter is used to draw Axis Labels, Bar Marks and Legend. If you want to specify exact X coordinates, then you must use TChartSeries.AddXY method.


AddBar Method (THorizBarSeries)
AddBar Method

See also

Applies to

THorizBarSeries component

Declaration

function AddBar( Const Value: Double; Const Text: String; Color: TColor): LongInt;

Description

*Important The AddBar Method has been maintained only for this version of TeeChart to help those migrating from previous versions of TeeChart. The AddBar method calls the Add method. For those of you writing new code please use the Add method. The AddBar method will be removed in the next version of TeeChart.

The AddBar function appends a new horizontal Bar point to the Series.

The Value parameter defines the Bar width.

New added points are optionally sorted in ascending or descending order either by their horizontal or vertical coordinates.

You can turn sorting off by setting the XValues and YValues Order property to loNone.

This function returns the corresponding internal Bar point index. You can then refer to this Bar point by using this index.

It calls the default AddXY method.


AddBar method (TBarSeries) See also
See Also

TChartSeries.AddY

TChartSeries.Add

TChartSeries.XValue

TChartSeries.YValue

TChartSeries.XLabel

TChartSeries.ValueColor


AddBar method (THorizBarSeries) See also
See Also

TChartSeries.AddXY

TChartValueList.Order


AddBubble method example
Example

This example randomly creates bubble values.

procedure TBubbleForm.FormCreate(Sender: TObject);

var t:Longint;

begin

  ComboBox1.ItemIndex:=Ord(psCircle); { <-- Circled Bubbles by default }

  BubbleSeries1.Clear;

  for t:=1 to 100 do

      BubbleSeries1.AddBubble( t,

                               Random(ChartSamplesMax),         { <-- y value }

                               ChartSamplesMax/(20+Random(25)), { <-- radius value }

                               '',                              { <-- label string }

                               GetDefaultColor(t));             { <-- color }

end;


AddBubble Method

See also	Example

Applies to

TBubbleSeries component

Declaration

function AddBubble(Const AX,AY,ARadius:Double; Const AXLabel:String; AColor:TColor): Longint;

Description

The AddBubble method appends a new Bubble point to the Series Points List. The Bubble point is assigned to be at AX,AY coordinates and have ARadius, Label and Color parameters. You can specify clTeeColor as Color parameter to draw it using a predefined color. The Label parameter is used to draw Axis Labels, Bubble Marks and Legend.


AddBubble method See also
See Also

TChartSeries.AddXY

TBubbleSeries.RadiusValues

TChartSeries.XLabel

TChartSeries.XValue

TChartSeries.YValue

TChartSeries.ValueColor


AddChartValue Example

The code used to add a point is:

Function TChartSeries.AddXY( Const AXValue,AYValue:Double; Const AXLabel:String; AColor:TColor):Longint;

Begin

result:=-1;

FX.TempValue:=AXValue;

FY.TempValue:=AYValue;

if (not Assigned(FOnBeforeAdd)) or FOnBeforeAdd(Self) then

Begin

result:=FX.AddChartValue(FX.TempValue);

FY.InsertChartValue(result,FY.TempValue);

FColors.Insert(result,Pointer(AColor));

InsertXLabel(result,AXLabel);

NotifyNewValue(Self,result);

end;

end;


AddChartValue Method

See also	Example

Applies to

TChartValueList component

Declaration

function AddChartValue(Const Value : Double) : Longint;

Description

This function is used internally to add values to individual Chart lists. The Series AddY and AddXY method call this function both for X and Y Chart Value Lists.


AddChartValue See also
See Also

TChartValueList.InsertChartValue

TChartSeries.AddY


AddErrorBar Example

This code adds a new Error Bar:

ErrorBarSeries1.AddErrorBar( 1234, 5678, 23, 'MyErrorBar', clTeeColor );


AddErrorBar Method

See also	Example

Applies to

TErrorBarSeries component

Declaration

function AddErrorBar(Const AX,AY,AError: Double; Const AXLabel: String; AColor: TColor): Longint;

Description

The AddErrorBar function adds a new Error Bar point to the Series. Returns the position of the Error Bar in the list. Positions start at zero. The AError parameter is stored at ErrorValues list.

Each Bar is displayed with an Error "T" on top. You can control the "T" appearance by using the ErrorPen and ErrorWidth properties.


AddErrorBar See also
See Also

TErrorBarSeries.ErrorPen

TErrorBarSeries.ErrorValues

TErrorBarSeries.ErrorWidth


AddGantt Method

See also	Example

Applies to

TGanttSeries component

Declaration

function AddGantt(Const AStart,AEnd,AY: Double; Const AXLabel: String): LongInt;

Description

The AddGantt function adds a new Gantt bar to the Series. Each Gantt bar has the following parameters: AStart and AEnd The starting and ending Gantt bar horizontal coordinates. These can be normal floating values or DateTime values.

AY is the vertical Gantt bar coordinate. You can add as many Gantt bars you want, with or without same vertical coordinate. The vertical coordinate is usually a value starting from zero, but you can choose any other arbitrary value.

AXLabel is the associated Gantt bar text. It will be optionally shown as a Label at vertical axis and at TGanttSeries.Marks.

You can assign connecting lines between Gantt bars by using the TGanttSeries.NextTask property. You can assign a specific color to each Gantt bar by using the TChartSeries.ValueColor property or by calling the TGanttBar.AddGanttColor method. This function returns the corresponding internal point index. You can then refer to this Gantt bar by using this index. New added points are optionally sorted in ascending or descending order either by their horizontal or vertical coordinates. You can turn sorting off by setting the XValues and YValues Order property to loNone.


AddGantt method Example

Example

This code adds several Gantt bars and connects them:

With GanttSeries1 do

begin

{ remove all points }

Clear;

{ add several bars }

AddGantt( EncodeDate(1997,1,1), EncodeDate(1997,1,31),2,'Hello');

AddGantt( EncodeDate(1997,1,15), EncodeDate(1997,2,15),1,'Nice');

AddGantt( EncodeDate(1997,2,1), EncodeDate(1997,2,28),0,'World');

AddGantt( EncodeDate(1997,3,1), EncodeDate(1997,3,31),2,'');

AddGantt( EncodeDate(1997,4,1), EncodeDate(1997,4,30),0,'');

AddGantt( EncodeDate(1997,3,15), EncodeDate(1997,4,15),1,'');

{ connect some bars }

NextTask[0]:=3;

NextTask[1]:=5;

{ change connecting lines }

ConnectingPen.Width:=2;

ConnectingPen.Color:=clBlue;

{ increase bar heights }

Pointer.VertSize:=16;

{ remove legend }

ParentChart.Legend.Visible:=False;

{ arrange bottom axis to show exact datetime labels }

GetHorizAxis.ExactDateTime:=True;

GetHorizAxis.Increment:=DateTimeStep[dtOneMonth];

end;


AddGantt method See also
See Also

TGanttSeries.NextTask

TChartSeries.ValueColor

TGanttBar.AddGanttColor

TChartValueList.Order


AddGanttColor Method

See also	Example

Applies to

TGanttSeries component

Declaration

function AddGanttColor(Const AStart, AEnd, AY: Double; Const AXLabel: String; AColor: TColor): LongInt;

Description

The AddGanttColor function adds a new Gantt bar point to the Series.

It calls the AddGantt function and sets the specified AColor parameter by using the TChartSeries.ValueColor property.

This function returns the corresponding internal point index. You can then refer to this Gantt bar by using this index.

Please refer to TGanttSeries.AddGantt function for an example of adding Gantt bars.


AddGanttColor method See also
See Also

TGanttSeries.AddGantt

TGanttSeries.NextTask

TChartSeries.ValueColor


AddOHLC Method

See also	Example

Applies to

TOHLCSeries component

Declaration

function AddOHLC(Const ADate: TDateTime; Const AOpen,AHigh,ALow,AClose: Double): LongInt;

Description

The AddOHLC function appends a new Stock Market point to the Series. This function returns the corresponding point index for the new added point.

You must use this method to add new points to TCandleSeries.


AddOHLC method See also
See Also

TChartSeries.AddXY


AddPalette Example

This code creates a customized color palette. Polygons with Y values lower than or equal to 3000 will be filled in Green color, Polygons with Y values lower than or equal to 2000 will be filled in Yellow color and Polygons with Y values lower than or equal to 1000 will be filled in Red color.

SurfaceSeries1.ClearPalette;

SurfaceSeries1.AddPalette( 1000, clRed );

SurfaceSeries1.AddPalette( 2000, clYellow );

SurfaceSeries1.AddPalette( 3000, clGreen );

SurfaceSeries1.Repaint;


AddPalette Method

See also	Example

Applies to

TSurfaceSeries component

Declaration

function AddPalette(Const Value: Double; Color: TColor): Longint;

Description

This method adds a new color Palette entry to the end of Palette list. Add returns the position of the entry in the Palette list. The Color parameter will be used to fill polygons with Y values up to the Value parameter. Custom color palettes can be created using this method. The UsePalette property should be True to use the palette entries.


AddPalette See also
See Also

TSurfaceSeries.ClearPalette

TSurfaceSeries.UsePalette


AddPie Method Example
AddPie Example

This example adds 3 pie sectors to series1 (a pie series)

With Series1 do

Begin

   Clear ;

    AddPie(  40, 'Pencil' , clRed ) ;

    AddPie(  60, 'Paper',  clBlue ) ;

    AddPie(  30, 'Ribbon', clGreen ) ;

end;


AddPie Method

See also	Example

Applies to

TPieSeries component

Declaration

function AddPie(Const PieValue: Double; Const APieLabel: String; AColor: TColor) : LongInt;

Description

*Important The AddPie Method has been maintained for this version only of TeeChart to help those migrating code from previous versions of TeeChart. The AddPie method now calls the Add method. For those of you writing new code please use the Add method directly. The AddPie method will be removed in the next version of TeeChart.

AddPie appends new Pie sectors to a TPieSeries component.

The PieValue can be any integer.


AddPolar Example

This code adds some random points to a PolarSeries:

PolarSeries1.Clear ;

PolarSeries1.AddPolar( 90, Random( 1000 ), 'pi/2', clRed );

PolarSeries1.AddPolar( 180, Random( 1000 ), 'pi', clBlue );

PolarSeries1.AddPolar( 270, Random( 1000 ), '3*pi/4', clGreen );

PolarSeries1.AddPolar( 360, Random( 1000 ), '2*pi', clYellow );


AddPolar Method

See also	Example

Applies to

TPolarSeries component

Declaration

function AddPolar(Const Angle,Value: Double; Const ALabel: String; AColor: TColor): LongInt;

Description

The AddPolar function inserts a new Point to draw. The new point coordinates are expressed in Angle -> Vector format. Angles are expressed in degree units. Points are sorted and drawn in Angle ascending order.


AddPolar See also
See Also

TCircledSeries.RotationAngle


AddSeries Method

See also

Applies to

TChart component

Declaration

procedure AddSeries(ASeries : TChartSeries);

Description

The AddSeries method adds a new Series component to the Chart. It's exactly the same as setting the Series.ParentChart property to the Chart.

LineSeries1.ParentChart := Chart1 ;

You should use the ParentChart property.


AddSeries method See also
See Also

TChartSeries.ParentChart


AddValue Method

Applies to

TChartSeries component

Declaration

procedure AddValue( ValueIndex : Longint ) ; virtual ;

Description

You dont need to call AddValue directly.

This is an internal method.


AddXY Example

procedure TCurveFittingForm.Timer1Timer(Sender: TObject);

begin

  Timer1.Enabled:=False; { <-- stop timer }

  With StockPrice do

  Begin

    Delete(0); { <-- remove the first point }

    { Add a new random point }

    AddXY( XValues.Last+1,

           (YValues.Last/YValues.Multiplier)+(Random(ChartSamplesMax)-(ChartSamplesMax/2)),

           '',clTeeColor);

    Chart1Zoom(Self); { <-- recalculate Curve !!!! }

  end;

  Timer1.Enabled:=True; { <-- restart timer }

end;


AddXY Method

See also	Example

Applies to

TChartSeries component

Declaration

function AddXY(Const AXValue, AYValue: Double; Const AXLabel: String; AColor: TColor) : Longint;

Description

This function inserts a new point in the Series. The new point has X and Y values. The AXLabel parameter is optional (can be empty ''). The AColor parameter is optional (can be clTeeColor). The function returns the new point position in the Values list.


AddXY See also
See Also

AddY function


AddXYZ Example

This code creates a new Surface Series :

SurfaceSeries1.Clear;

for x:= 1 to 20 do

for z := 1 to 30 do

SurfaceSeries1.AddXYZ( x, Random(100), z ) ;


AddXYZ Method

See also	Example

Applies to

TSurfaceSeries component

Declaration

function AddXYZ(AX: Longint; Const AY: Double; AZ: Longint; Const AXLabel: String; AColor: TColor): Longint;

Description

The AddXYZ method adds a new point to the Surface Series. You can also use the Surface OnGetYValue Event to supply Y values for a given pair of X,Z values. Specific colors can be assigned to each Surface polygon by using the AColor parameter.


AddXYZ See also
See Also

TChartSeries.Clear

TSurfaceSeries.OnGetYValue

TSurfaceSeries.ReCreateValues

TSurfaceSeries.ZValue


AddY Example

LineSeries1.AddY( 6.5, 'Revenues', clTeeColor);


AddY Method

See also	Example

Applies to

TChartSeries component

Declaration

function AddY(Const AYValue: Double; Const AXLabel: String; AColor: TColor): Longint;

Description

The TChartSeries AddY method can be used to insert new Series points when you do not have an X Value for the point.

This function inserts a new point in the Series. The new point only has Y values. X value is automatically calculated.

The AXLabel parameter is optional (can be empty '').

The AColor parameter is optional (can be clTeeColor).

The function returns the new point position in the Values list.


AddY See also
See Also

AddXY Method

TChartSeries.Add


AdjustFrame Property

See also

Applies to

TChartTitle component

Declaration

property AdjustFrame : Boolean;

Description

Default: True.

The AdjustFrame property controls if Chart Title and Foot frames will be resized to full Chart dimensions or to the title text width. It has only effect when Chart.Title or Chart.Foot.Frame.Visible property is True.


AdjustFrame See also
See Also

TChart.Title

TChart.Foot

TChartTitle.Frame


AdjustMaxMin Method

See also

Applies to

TChartAxis component

Declaration

procedure AdjustMaxMin;

Description

This Axis method calculates Maximum and Minimum values based on Max and Min values of the dependent Series.

AdjustMaxMin is automatically called if Axis.Automatic is True.

The Chart UndoZoom method calls AdjustMaxMin for Left, Right,Top and Bottom axis.


AdjustMaxMin See also
See Also

Chart UndoZoom


AfterDrawValues Event

Applies to

TChartSeries component

Declaration

property AfterDrawValues : TNotifyEvent;

Description

AfterDrawValues event is called just after the Series points have been painted. You can then paint on the Chart.Canvas your customized drawings.

WARNING:

Do not change Series properties that would force the Series to be repainted. This may cause recursion and endless repainting !


Alignment Property (TChartLegend)
Alignment Property

See also

Applies to

TChartLegend component

Declaration

property Alignment : TLegendAlignment;

Description

Default Value: laRight

The Alignment property defines the Legend position.

Legend can be currently placed at Top, Left, Right and Bottom side of Chart.

Left and Right Legend alignments define a vertical Legend with currently one single column of items.

Top and Bottom Legend alignments define an horizontal Legend with currently one single row of items.

The Legend itself automatically reduces the number of displayed legend items based on the available charting space.

The Legend.ResizeChart property controls if Legend dimensions should be used to reduce Chart points space.

The Legend.OnGetLegendRect event provides a mechanism to supply the desired Rectangle Legend dimensions and placement.

The Legend.OnGetLegendPos event can be used to specify fixed Legend items X Y coordinates.

The Legend.HorizMargin and VertMargin properties control distance between Legend and Left and Right margins.

The Legend.TopPos property can be used in Left or Right Legend alignments to control vertical distance between Legend and Top Chart Margin.

These techniques allow almost complete Legend control.

TChartLegend is quite a big component with many available formatting and dimensioning properties.


Alignment Property (TChartShape)

Applies to

TChartShape component

Declaration

property Alignment : TAlignment;

Description

.


Alignment Property (TChartTitle)

See also

Applies to

TChartTitle component

Declaration

property Alignment : TAlignment;

Description

Default Value: taCenter

The Alignment property controls how Chart Title and Foot text will be aligned within Chart rectangle.

A TChartTitle can optionally be surrounded by a Frame.


Alignment property (TChartLegend) See also
See Also

TChartLegend

TChartLegend.HorizMargin

TChartLegend.ResizeChart

TChartLegend.TopPos

TChartLegend.VertMargin


Alignment property (TChartTitle) See also
See Also

TChartTitle.Frame


AllowPanning Property

See also

Applies to

TChart, TDBChart components

Declaration

property AllowPanning : TPanningMode

Description

The AllowPanning property controls runtime Scrolling.

Possible values are:

pmNone 	Deny scrolling.

pmHorizontal 	Allow only Horizontal Scrolling.

pmVertical 	Allow only Vertical Scrolling.

pmBoth 	Allow complete Horizontal and Vertical Scrolling.


AllowPanning See also
See Also

Scrolling and Panning


AllowSinglePoint Property

Applies to

TChartSeries component

Declaration

property AllowSinglePoint : Boolean;

Description

.


AllowZoom Example

You can also Zoom a specific chart region by coding:

( This example uses the Bottom and Left axis)

Chart1.BottomAxis.Automatic := False ;

Chart1.BottomAxis.Minimum   := 45.2 ;

Chart1.BottomAxis.Maximum   := 67.1 ;

Chart1.LeftAxis.Automatic := False ;

Chart1.LeftAxis.Minimum   := 150 ;

Chart1.LeftAxis.Maximum   := 300 ;


AllowZoom Property

See also	Example

Applies to

TChart, TDBChart components

Declaration

property AllowZoom : Boolean;

Description

The AllowZoom boolean property toggles the runtime Zoom. Setting it to True will allow runtime Zoom by dragging the mouse.


AllowZoom See also
See Also

Zooming


Angle Property

See also

Applies to

TChartAxisTitle component

Declaration

property Angle : Integer;

Description

The Angle property determines the Axis Title rotation in degree units.

Valid values are 0, 90, 180, 270 and 360 degrees.

TChartAxis.Title.Caption property should be non empty.

By default, horizontal Axis (TopAxis and BottomAxis) have a Title Angle of 0.

LeftAxis.Title.Angle is 90 by default.

RightAxis.Title.Angle is 270 by default.

Warning:

Rotated Fonts are partially supported in Windows 16bit GDI Metafile format. Some printer devices can't print rotated fonts. Check you have the latest Printer Driver version.


Angle property See also
See Also

TChartAxis.LabelsAngle

TChartAxisTitle.Caption


AngleIncrement Example

PolarSeries1.AngleIncrement:= 45 ;  { grid lines each 45 degree }


AngleIncrement Property

See also	Example

Applies to

TPolarSeries component

Declaration

property AngleIncrement : Double;

Description

The AngleIncrement property indicates the number of degrees that will be used to draw the dividing grid lines in anti-clockwise direction. The 0 starting angle is located at rightmost Polar coordinate. Valid increments are between 0 and 359 degree.

You can control the grid lines pen by using the Chart.BottomAxis.GridPen property.


AngleIncrement See also
See Also

TChart.BottomAxis.GridPen

TPolarSeries.PiePen

TChart.RadiusIncrement


AngleToPos Example

;


AngleToPos Method

See also	Example

Applies to

TCircledSeries component

Declaration

function AngleToPos(Const Angle; AXRadius; AYRadius: Double;var X,Y: Longint);

Description

The AngleToPos functions returns the exact Screen position for a given pair of Angle and Radius values.

Angles must be expressed in radians from 0 to 2*PI. Radius parameter is in number of pixels.


AngleToPos See also
See Also

TCircledSeries.PointToAngle

TCircledSeries.RotationAngle

TCircledSeries.XRadius

TCircledSeries.YRadius


AnimatedZoom Property

See also

Applies to

TChart, TDBChart component

Declaration

property AnimatedZoom : Boolean;

Description

Default False

The AnimatedZoom property determines if Zoom will be performed directly or it will be displayed as an animated sequence of zooms. The AnimatedZoomSteps property controls the number of zoom steps. AnimatedZoom can be useful when there are a lot of points.

This boolean property controls if Zoom will be instantaneous or it will be dynamic.

When AnimatedZoom is True, Zoom is performed by applying succesive Zooms. The number of Zoom steps can be changed using the AnimatedZoomSteps property.


AnimatedZoom See also
See Also

TChart.AllowZoom

TChart.AnimatedZoomSteps

TChart.ZoomPercent

TChart.ZoomRect


AnimatedZoomFactor Global Variable

See also

Applies to

All TeeChart components

Declaration

property AnimatedZoomFactor : Double;

Description

Default Value: 3.0

The AnimatedZoomFactor property defines the zoom proportion ratio to apply at each successive zoom step.

The TChart.AnimatedZoom property must be True for this property to be in effect.

The TChart.AnimatedZoomSteps property determine the number of zoom steps to apply until Axis scales are set to the desired zoom.

Change the AnimatedZoomFactor property to make those steps to go faster or slower.


AnimatedZoomFactor Global Variable See also
See Also

TChart.AnimatedZoom

TChart.AnimatedZoomSteps


AnimatedZoomSteps Example

This code turns on the animated zoom feature:

Chart1.AnimatedZoom := True ;

Chart1.AnimatedZoomSteps := 4 ;


AnimatedZoomSteps Property

See also	Example

Applies to

TChart, TDBChart components

Declaration

property AnimatedZoomSteps : Integer;

Description

Default: 8

The AnimatedZoomSteps property determines the number of steps of the animated zooming sequence. Big number of steps can delay zooming. The AnimatedZoom property should be True.


AnimatedZoomSteps See also
See Also

TChart.AllowZoom

TChart.AnimatedZoom

TChart.ZoomPercent

TChart.ZoomRect


AnswerVector Property

See also

Applies to

TCurveFittingFunction component

Declaration

property AnswerVector[ Index : Longint ] : Double;

Description

Read-only and run time only. The AnswerVector array property returns the polynomical coefficients used to calculate all CurveFitting points. TCurveFittingFunction calculates the coefficients just before drawing all points.

This code displays the polynomy:

  for t := 1 to CurveFittingSeries1.PolyDegree do

  begin

    WriteLn( 'Degree: ', t, CurveFittingSeries1.AnswerVector[ t ]:15:5 );

  end;

The GetCurveYValue function returns the corresponding Y value for a given X value.


AnswerVector property See also
See Also

TCurveFittingFunction.GetCurveYValue

TCurveFittingFunction.PolyDegree


ApplyBarOffset Method

See also

Applies to

TCustomBarSeries component

Declaration

function ApplyBarOffset(Position : Longint): LongInt;

Description

The ApplyBarOffset function modifies and returns the Position parameter. BarSeries have an OffsetPercent property that makes all Bars to be displayed horizontally a specific amount of pixels based on Bar's width.

The Position parameter must be expressed in screen pixels.

The formula used is:

result:= Position + Round( OffsetPercent * BarWidth / 100.0 )

When OffsetPercent property is zero (the default), the Position parameter is returned unmodified.


ApplyBarOffset method See also
See Also

TCustomBarSeries.OffsetPercent

TCustomBarSeries.BarWidth


ApplyDark Method

See also

Applies to

All TeeChart Components

Declaration

function ApplyDark(Color: TColor; HowMuch: Byte) : TColor;

Description

Global

The ApplyDark function converts the Color parameter to a darker color. The HowMuch parameter indicates the quantity of dark increment. It is used by TBarSeries and TPieSeries to calculate the right color to draw Bar sides and Pie 3D zones. Series.pas must be in your uses clause.

This is the ApplyDark source code:

Function ApplyDark(Color:TColor; HowMuch:Byte):TColor;

Var r,g,b:Byte;

Begin

Color:=ColorToRGB(Color);

r:=GetRValue(Color);

g:=GetGValue(Color);

b:=GetBValue(Color);

if r>HowMuch then r:=r-HowMuch else r:=0;

if g>HowMuch then g:=g-HowMuch else g:=0;

if b>HowMuch then b:=b-HowMuch else b:=0;

result:=RGB(r,g,b);

End;


ApplyDark method See also
See Also

TCustomBarSeries.Dark3D

TPieSeries.Dark3D


ApplyZOrder Property

See also

Applies to

TChart component

Declaration

property ApplyZOrder : Boolean;

Description

Run-time only.

The ApplyZOrder property controls if several Series on the same TChart component should be displayed each one in a different Z space.

It's valid only when TChart.View3D property is True and when there's more than one Series in same chart.

When False, all Series are drawn using the full Chart Z space. The Chart output can be confusing if Series overlap.

The "LASTVALU.PAS" example unit under TEEDEMO.DPR project shows an example of ApplyZOrder property.


ApplyZOrder Property See also
See Also

TChart.MaxZOrder

TChart.View3D

TChartSeries.ZOrder


AreaBrush Property

See also

Applies to

TAreaSeries component

Declaration

property AreaBrush : TBrushStyle;

Description

Default Value: bsSolid

The AreaBrush property indicates the kind of Brush used to fill the background Area region. You can control the Area background color by using the AreaColor property.


AreaBrush property See also
See Also

TAreaSeries.SeriesColor

TAreaSeries.AreaColor

TAreaSeries.AreaLinesPen


AreaColor Property

See also

Applies to

TAreaSeries component

Declaration

property AreaColor : TColor;

Description

Default Value: clTeeColor

The AreaColor property defines the Color used to fill the background Area region. You can control the Brush style by using the AreaBrush property.


AreaColor property See also
See Also

TAreaSeries.SeriesColor

TAreaSeries.AreaBrush

TAreaSeries.AreaLinesPen


AreaLinesPen Property

See also

Applies to

TAreaSeries component

Declaration

property AreaLinesPen : TChartPen;

Description

The AreaLinesPen property indicates the kind of pen used to draw vertical lines across the Area region. By default AreaLinesPen.Visible is False, so you need first to set it to True. You can control the Area Brush style by using the AreaBrush property.


AreaLinesPen property See also
See Also

TAreaSeries.SeriesColor

TAreaSeries.AreaBrush

TAreaSeries.AreaColor


Arrow Property

See also

Applies to

TSeriesMarks component

Declaration

property Arrow : TChartPen;

Description

The Arrow property determines the kind of pen used to draw a line connecting the Point Mark to the corresponding Series point.

Each Series component handles Marks in a different manner, thus the Arrow coordinates are specific to each Series type.

By default, Arrow pen is defined to be a White solid pen of 1 pixel width.


Arrow property See also
See Also

TSeriesMarks.ArrowLength


ArrowCha Unit

The ArrowCha unit contains the declarations for the following components and for the enumerated type associated with them. When you add a component declared in this unit to a form, the unit is automatically added to the uses clause of that form's unit. The following items are declared in the this unit:

Components

TArrowSeries

Types

Routines

To see a listing of items declared in this unit including their declarations, use the ObjectBrower.


ArrowHeight property example

This code checks series type and changes the ArrowHeight accordingly. Here acting like on/off.

if TheSeries is TCustomBarSeries then

     TheSeries.Marks.ArrowHeight:=10

  else

     TheSeries.Marks.ArrowHeight:=0;


ArrowHeight Property

See also	Example

Applies to

TArrowSeries component

Declaration

property ArrowHeight : Integer;

Description

Default value: 4

The ArrowHeight property determines the vertical arrow head size in pixels.


ArrowHeight See also
See Also

TArrowSeries.ArrowWidth

TSeriesPointer.VertSize


ArrowLength property example

This code checks series type and changes the ArrowLength.

if TheSeries is TCustomBarSeries then

     TheSeries.Marks.ArrowLength:=10

  else

     TheSeries.Marks.ArrowLength:=0;


ArrowLength Property

See also	Example

Applies to

TSeriesMarks component

Declaration

property ArrowLength : Integer;

Description

Default Value: 16

The ArrowLength property determines the number of pixels used to display a line connecting the Series Marks to their corresponding points.

The Arrow property is the Pen used to draw this line.


ArrowLength property See also
See Also

TSeriesMarks.Arrow


ArrowWidth Property

See also

Applies to

TArrowSeries component

Declaration

property ArrowWidth : Integer;

Description

Default value: 4

The ArrowHeight property determines the horizontal arrow head size in pixels.


ArrowWidth See also
See Also

TArrowSeries.ArrowHeight

TArrowSeries.ArrowLength

TSeriesPointer.HorizSize


Assign method example

This code uses a button to copy a series from one chart to another.

procedure TForm1.BitBtn1Click(Sender: TObject);

begin

CopySeries(DBChart2,DBChart1, self);

BitBtn1.Visible:=False;

end;

type TChartClass=class of TChart;

Procedure TForm1.CopySeries(DestChart,SourceChart:TChart; AOwner:TComponent);

Var tmpSeries:TChartSeries;

    tmpS:TChartSeriesClass;

    t:Longint;

begin

  for t:=0 to SourceChart.SeriesCount-1 do

  begin

    tmpS:=TChartSeriesClass(SourceChart.Series[t].ClassType);

    tmpSeries:=tmpS.Create(AOwner);

    tmpSeries.Assign(SourceChart.Series[t]);

    tmpSeries.Name:=(SourceChart.Series[t].Name) + 'copy';

    DestChart.AddSeries(tmpSeries);

  end;

end;


Assign Method

Example

Applies to

TChart, TDBChart components

Declaration

Procedure Assign(Source : TPersistent) : Override

Description


AssignValues Example

This code copies all points from LineSeries1 to LineSeries2 :

LineSeries2.AssignValues( LineSeries1 );


AssignValues Method

See also	Example

Applies to

TChartSeries component

Declaration

procedure AssignValues(Source : TChartSeries);

Description

The AssignValues method creates new Series points from Source list of points.

Source:

Procedure TChartSeries.AssignValues(Source : TChartSeries);

var t:Longint;

Begin

  Clear;

  for t:=0 to Source.Count-1 do AddedValue(Source,t);

end;

The AddedValue method creates a new clone point from Source point and inserts it using the AddXY method.


AssignValues See also
See Also

TChartSeries.AddXY

TChartSeries.RecalcOptions

TChartSeries.RefreshSeries


AutoMarkPosition Property

Applies to

TBarSeries and THorizBarSeries components

Declaration

property AutoMarkPosition : Boolean;

Description

Default: True


AutoRefresh Property

See also

Applies to

TDBChart component

Declaration

property AutoRefresh : Boolean;

Description

Default Value: True

The AutoRefresh property determines if TDBChart will load all Table or Query records in an automatic way just when the Table or Query are Opened.

When False, you should manually force record retrieval by calling one of the following methods:

TDBChart.RefreshDataSet

TDBChart.RefreshData

When True, TDBChart will retrieve all Series point values as soon the Table is opened or the Query is executed.


AutoRefresh property See also
See Also

TDBChart.RefreshData

TDBChart.RefreshDataSet


Automatic Example

You can control the Axis scale manually:

Chart1.LeftAxis.Automatic := False ;

Chart1.LeftAxis.Maximum   := 1000 ;

Chart1.LeftAxis.Minimum   :=    0 ;

Or, in case DateTime values:

Chart1.BottomAxis.Automatic := False ;

Chart1.BottomAxis.Maximum   := EncodeDate ( 1995, 12 , 31 ) ;

Chart1.BottomAxis.Minimum   := EncodeDate ( 1995,  1 ,  1 ) ;


Automatic Property

See also	Example

Applies to

TChartAxis component

Declaration

property Automatic : Boolean;

Description

If Axis.Automatic property is True, then the Maximum and Minimum values for the Axis will be calculated with all Axis dependent Series.


AutomaticMaximum Property

See also

Applies to

TChartAxis component

Declaration

property AutomaticMaximum : Boolean

Description

Default: True

The AutomaticMaximum property controls if Axis will adjust the Maximum value automatically based on the maximum value of its associated Series.


AutomaticMaximum See also
See Also

TChartAxis.Automatic

TChartAxis.AutomaticMinimum

TChartAxis.Maximum

TChartAxis.Minimum


AutomaticMinimum Property

See also

Applies to

TChartAxis component

Declaration

property AutomaticMinimum : Boolean;

Description

Default True

The AutomaticMinimum property controls if Axis will adjust the Minimum value automatically based on the minimum value of its associated Series.


AutomaticMinimum See also
See Also

TChartAxis.Automatic

TChartAxis.AutomaticMaximum

TChartAxis.Maximum

TChartAxis.Minimum


Axis Property

See also

Applies to

TChartAxis component

Declaration

property Axis : TChartPen;

Description

The Axis property determines the kind of pen used to draw the Axis major lines. These are the lines which go from Axis Minimum to Axis Maximum screen positions.


Axis property See also
See Also

TChartAxis.Grid

TChartAxis.Ticks

TChartAxis.MinorTicks

TChartAxis.TicksInner

TChartAxis.LabelsFont


AxisValuesFormat property Example

AxisValuesFormat examples:

1. 	DBChart1.LeftAxis.AxisValuesFormat:='#,##0.00'

{Outputs labels eg. 10.00, 25.00, 150.00}

2.	DBChart1.LeftAxis.AxisValuesFormat:='#,##0.###'

{Outputs labels eg. 10, 25, 150}

This code can be used at the OnGetAxisLabel Chart event to paint labels only at the desired increments. The following code is useful for logarithmic axis:

{event OnGetAxisLabel - see Object Inspector events for TChart/TDBChart}

procedure TForm1.DBChart1GetAxisLabel(Sender: TChartAxis;

  Series: TChartSeries; ValueIndex: Longint; var LabelText: string);

  Function MyLabelValue(Const Value:Double):String;

  begin

    result:=FormatFloat(Sender.AxisValuesFormat,Value);

  end;

begin

  if ( Sender = DBChart1.LeftAxis ) then

  With Sender do

  begin

    if ( LabelText<>MyLabelValue(10) ) and

       ( LabelText<>MyLabelValue(100) ) and

       ( LabelText<>MyLabelValue(1000) ) and

       ( LabelText<>MyLabelValue(10000) ) then

         LabelText:='';

  end;

end;


AxisValuesFormat Property

See also	Example

Applies to

TChartAxis component

Declaration

property AxisValuesFormat : String;

Description

Default Value: '#,##0.###'

The AxisValuesFormat specifies the desired formatting string to be applied to Axis Labels. It has effect when Axis associated Series have their XValues.DateTime or YValues.DateTime property set to False.

For DateTime Axis labels use the TChartAxis.DateTimeFormat property.


AxisValuesFormat See also
See Also

TChartAxis.DateTimeFormat

TChartAxis.OnGetAxisLabel

TChartAxis.LabelStyle

TChartValueList.DateTime

TChartAxis.LabelsFont


AxisVisible Property

Applies to

TChart, TDBChart components

Declaration

property AxisVisible : Boolean;

Description

Default value: True

This property shows or hides the four Chart Axis at once.

Each Axis will be drawn depending also on their Visible property.


BackColor Property (TChart)
BackColor Property

See also

Applies to

TChart, TDBChart components

Declaration

property BackColor : TColor;

Description

The BackColor property is the color the Chart rectangle is filled with. The Chart rectangle is the screen area between axis. Setting BackColor to clTeeColor does not fill the above rectangle. Assigning clTeeColor to Chart.BackColor makes TeeChart to not fill the Chart back area, so Gradient fills and Background Bitmaps can be shown.


BackColor Property (TSeriesMarks)
BackColor Property

See also

Applies to

TSeriesMarks component

Declaration

property BackColor : TColor;

Description

Default Value: ChartMarkColor = $80FFFF  (Yellow)

The BackColor property defines the color used to fill the Marks background rectangle.

You can make Marks transparent by setting the Transparent property to False.


BackColor See also
See Also

Chart Color property

TChart.Gradient

TChart.BackImage


BackColor property See also
See Also

TSeriesMarks.Frame

TSeriesMarks.Font

TSeriesMarks.Transparent

TSeriesMarks.Visible


BackImage Property

See also

Applies to

TChartcomponent

Declaration

property BackImage : TPicture;

Description

The BackImage property defines the Chart background image. You may define the image at design time.

You can use the BackImageMode property to control if the bitmap will be drawn "stretched", "normal" or "tiled".


BackImage See also
See Also

TChart.BackImageInside

TChart.Color

TChart.Gradient

TChart.BackImageMode


BackImageInside Property

See also

cApplies to

TChart component

Declaration

property BackImageInside : Boolean;

Description

Default False

When True this property restricts display of the BackImage to inside the chart Frame area.


BackImageInside See also
See Also

TChart.BackImage

TChart.BackImageMode


BackImageMode Property

See also

cApplies to

TChart component

Declaration

property BackImageMode : TTeeBackImageMode;

Description

Default pbmStretch

The BackImageMode property determines how will the background bitmap be displayed.


BackImageMode See also
See Also

TChart.BackImage


BackWallRect Method

Applies to

TChart, TDBChart components

Declaration

function BackWallRect:TRect;

Description


BarBrush Example

This code will display Bars with patterns:

BarSeries1.BarBrush.Style := bsFDiagonal;

BarSeries1.BarBrush.Color := clWhite;

BarSeries1.SeriesColor    := clRed;


BarBrush Property

See also	Example

Applies to

TBarSeries and THorizBarSeries components

Declaration

property BarBrush : TBrush;

Description

The BarBrush property defines the Brush used to fill Bars. You can set the Brush Color and Brush Style properties. When BarBrush.Style is different than bsSolid, the SeriesColor color is the background bar color.


BarBrush See also
See Also

TCustomBarSeries.BarPen

TCustomBarSeries.Dark3D


BarHeight Example

tmp := HorizBarSeries1.BarHeight;


BarHeight Property

See also	Example

Applies to

THorizBarSeries component

Declaration

property BarHeight : Longint;

Description

Run-time and read only. The BarHeight property returns the height of horizontal Bars in pixels. Bar heights change at run-time when resizing or zooming the Chart. BarHeight is a read-only property. You can use the CustomBarHeight property to set a fixed pixels Bar height.


BarHeight See also
See Also

THorizBarSeries.CustomBarHeight

THorizBarSeries.SideMargins

TCustomBarSeries.BarWidthPercent


BarMargin Property

See also

Applies to

TBarSeries and THorizBarSeries components

Declaration

property BarMargin : LongInt;

Description

The BarMargin function returns the margin size in pixels. The SideMargins property controls if margins will be applied or not.


BarMargin See also
See Also

TCustomBarSeries.SideMargins


BarPen Property

See also

Applies to

TCustomBarSeries component

Declaration

property BarPen : TChartPen;

Description

The BarPen property indicates the kind of pen used to draw the Bar rectangles. You can set BarPen.Visible:=False to hide those lines.


BarPen property See also
See Also

TCustomBarSeries.BarBrush

TCustomBarSeries.BarStyle


BarStyle Property

See also	Example

Applies to

TBarSeries, THorizBarSeries, TCustomBarSeries component

Declaration

property BarStyle : TBarStyle;

Description

Default Value: bsRectangle

The BarStyle property defines the Bar shape used to draw Bars.


BarStyle Property Example

This example sets the BarStyle to the Pyramid type.

BarSeries1.BarStyle := bsPyramid ;


BarStyle property See also
See Also

TCustomBarSeries.BarWidthPercent

TCustomBarSeries.OffsetPercent


BarWidth Example

BarSeries1.CustomBarWidth := BarSeries1.BarWidth + 5 ;


BarWidth Property

See also	Example

Applies to

TBarSeries component

Declaration

property BarWidth : LongInt;

Description

Run time and read only. The BarWidth property returns the width of vertical Bars in pixels. Bar widths change at run-time when resizing or zooming the Chart. BarWidth is a read-only property. You can use the CustomBarWidth property to set a fixed pixels Bar width.


BarWidth See also
See Also

TBarSeries.CustomBarWidth

TBarSeries.SideMargins

TCustomBarSeries.BarWidthPercent


BarWidthPercent Property

See also

Applies to

TCustomBarSeries component

Declaration

property BarWidthPercent : Integer;

Description

Default Value: 70

The BarWidthPercent property determines the percent of total Bar width used. Setting BarWidthPercent := 100 makes joined Bars. You can control how many Bars appear at same time by using TChart.MaxPointsPerPage property. The BarWidth and BarHeight properties indicate Bar dimensions in pixels.


BarWidthPercent property See also
See Also

TCustomBarSeries.OffsetPercent

TBarSeries.BarWidth

TBarSeries.CustomBarWidth

THorizBarSeries.BarHeight

THorizBarSeries.CustomBarHeight


BeforeDrawValues Event

Applies to

TChartSeries component

Declaration

property BeforeDrawValues : TNotifyEvent;

Description

BeforeDrawValues event is called just before the Series points will be painted.

You can then paint on the Chart.Canvas your customized drawings.

WARNING:

Do not change Series properties that would force the Series to be repainted.

This may cause recursion and endless repainting !


BlueFactor Example

This changes the default Surface color palette:

SurfaceSeries1.BlueFactor := 1.25 ;

SurfaceSeries1.CreateDefaultPalette( SurfaceSeries1.PaletteSteps );


BlueFactor Property

See also	Example

Applies to

TSurfaceSeries component

Declaration

property BlueFactor : Double;

Description

Default 1

Run time only. When UsePalette property is True, Surface Series create a default color palette. The BlueFactor property indicates the proportion of Blue color used to create the default palette.


BlueFactor See also
See Also

TSurfaceSeries.UsePalette

TSurfaceSeries.GreenFactor

TSurfaceSeries.RedFactor


BottomAxis Property

See also

Applies to

TChart component

Declaration

property BottomAxis : TChartAxis;

Description

The BottomAxis property is one of the two horizontal chart axis. BottomAxis has many formatting properties and maintains the correct scales for Series X values. Each Series can be associated either to BottomAxis or TopAxis. Charts can have some Series associated to BottomAxis and some to TopAxis. Use the Minimum and Maximum properties to specify the scale and Increment property to control separation between axis labels. Axis Labels and scales can optionally be DateTime values. This is accomplished by setting MySeries1.XValues.DateTime := True.

Please refer to TChartAxis help for a complete explanation of properties.


BottomAxis See also
See Also

TChart.TopAxis

TChart.LeftAxis

TChart.RightAxis


BottomWall Property

See also

Applies to

TChart component

Declaration

property BottomWall : TChartWall;

Description

The BottomWall property defines the pen and brush used to fill the bottom chart side. Available TChartWall properties are Size, Color, Pen and Brush. TChart.View3D and TChart.View3DWalls properties should be True to use BottomWall and LeftWall.


BottomWall See also
See Also

TChart.BackColor

TChart.LeftWall

TChart.View3D

TChart.View3DWalls


Brush Property (TChartShape)

See also

Applies to

TChartShape component

Declaration

property Brush : TBrush;

Description

The Brush property defines the kind of brush used to fill shape background.


Brush Property (TChartTitle)

See also

Applies to

TChartTitle component

Declaration

property Brush : TBrush;

Description

The Brush property determines the kind of brush used to fill the rectangle behind Chart.Title and Chart.Foot text.


Brush Property (TChartTitle) See also
See Also

TChartTitle.Frame

TChartTitle.AdjustFrame


Brush Property (TChartWall)

See also

Applies to

TChartWall component

Declaration

property Brush : TBrush;

Description

The Brush property determines the kind of brush used to fill the Chart Walls background.

The Chart.View3DWalls property should be True to make walls visible.


Brush Property (TSeriesPointer)
Brush Property

See also

Applies to

TSeriesPointer component

Declaration

property Brush : TBrush;

Description

The Brush property determines the kind of brush used to fill Series Pointers.


Brush Property (TSurfaceSeries)
Brush Property

See also	Example

Applies to

TSurfaceSeries component

Declaration

property Brush : TBrush;

Description

The Brush property determines the kind of brush that will be used to draw the Surface polygons. It only works when UsePalette and UseColorRange properties are False.


Brush property (TChart Shape) See also
See Also

TChartShape.Pen


Brush property (TChartWall) See also
See Also

TChart.View3DWalls

TChartWall.Color

TChartWall.Pen


Brush property (TSeriesPointer) See also
See Also

TSeriesPointer.Pen


Brush property (TSurfaceSeries) Example
Brush Example

This code changes the Surface brush:

SurfaceSeries1.UsePalette := False ;

SurfaceSeries1.UseColorRange := False ;

SurfaceSeries1.Brush.Style := bsDiagCross ;


Brush property (TSurfaceSeries) See also
See Also

TSurfaceSeries.Pen

TSurfaceSeries.UseColorRange

TSurfaceSeries.UsePalette


BubbleCh Unit

The BubbleCh unit contains the declarations for the following components and for the enumerated type associated with them. When you add a component declared in this unit to a form, the unit is automatically added to the uses clause of that form's unit. The following items are declared in the this unit:

Components

TBubbleSeries

Types

Routines

To see a listing of items declared in this unit including their declarations, use the ObjectBrower.


BufferedDisplay Property

Applies to

TChart, TDBChart components

Declaration

property BufferedDisplay : Boolean;

Description

Default, BufferedDisplay is True.

Charts are drawn to an "internal" canvas and then it is shown on screen. This prevents "flickering" and, when charts have a lot of points, can gain speed as it's faster to show an entire chart than drawing all points directly to screen.

For realtime charts, where new points are continuously being added, this is a must.


CalcClickedPart Method

Applies to

TChart, TDBChart components

Declaration

Procedure CalcClickedPart (Pos:TPoint; Var Part:TChartClickedPart);

Description

TChartClickedPartStyle=     (	cpNone,

cpLegend,

cpAxis,

cpSeries,

cpTitle,

cpFoot,

cpChartRect );

TChartClickedPart=Record

Part:TChartClickedPartStyle;

PointIndex: Longint;

ASeries:TChartSeries;

AAxis:TchartAxis;

end;


CalcClickedPie Example

This code shows a message when a Pie Sector is clicked:

procedure TForm1.Chart1MouseDown(Sender: TObject; Button: TMouseButton;

  Shift: TShiftState; X, Y: Integer);

var tmp : Longint;

begin

  tmp := PieSeries1.CalcClickedPie( x, y );

  if tmp > -1 then

     ShowMessage( PieSeries1.XLabel[ tmp ] );

end;


CalcClickedPie Method

See also	Example

Applies to

TPieSeries component

Declaration

function CalcClickedPie(x, y : Integer): LongInt;

Description

The CalcClickedPie function returns the Pie Sector Index that intersects with the X Y coordinate parameters. It currently works if Circled property is True.


CalcClickedPie See also
See Also

TCircledSeries.PointToAngle

TCircledSeries.AngleToPos


CalcLabelStyle Method

See also

Applies to

TChartAxis component

Declaration

function CalcLabelStyle : TAxisLabelStyle;

Description

The CalcLabelStyle function returns the most logical Axis Label style. It calculates the "best candidate" label style based on how many Active Series are in the Chart and if the Series has point labels. The TChartAxis.LabelStyle property must be set to talAuto for this function to do its job.

If LabelStyle is not talAuto, the LabelStyle property value is returned.


CalcLabelStyle method See also
See Also

TChartAxis.LabelStyle


CalcPosPoint Example

We want to calculate the LeftAxis value in the Vertical Screen coordinate of 220 pixels.

value := Chart1.LeftAxis.CalcPosPoint ( 220 ) ;


CalcPosPoint Method

See also	Example

Applies to

TChartAxis component

Declaration

function CalcPosPoint(Value : Integer) : Double;

Description

This function returns the corresponding value of a Screen position. The Screen position must be between Axis limits.


CalcPosPoint method See also
See Also

TChartSeries.CalcXPos

TChartSeries.CalcYPos


CalcRect Method

See also

Applies to

TChartAxis component

Declaration

procedure CalcRect(Var Rect : TRect);

Description

The CalcRect method determines the necessary space the Axis will need to display. It takes into account all Axis subcomponents dimensions like Title, Labels, Ticks, Width, etc.

The Rect parameter is modified with the amount in pixels.


CalcRect method See also
See Also

TChart.ChartRect


CalcSize3D Method

See also

Applies to

TChart component

Declaration

procedure CalcSize3d;

Description

The CalcSize3D calculates the amount of pixels each Series needs to display in 3D mode. The TChart.View3D property must be True. The TChart SeriesWidth3d and SeriesHeight3d properties are modified. CalcSize3D is called internally before drawing.


CalcSize3D method See also
See Also

TChart.CalcSize3DWalls

TChart.Width3d

TChart.Height3d

TChart.SeriesWidth3d

TChart.SeriesHeight3d


CalcSize3DWalls Method

See also

Applies to

TChart component

Declaration

procedure CalcSize3dWalls;

Description

The CalcSize3dWalls method calculates the amount of pixels of Chart Left Wall width and Bottom Wall height. The TChart.View3D property must be True. This method is called internally before drawing the Chart walls and before all Series points are displayed.

This method modifies the following TChart properties:

Width3d

Height3d

SeriesWidth3d

SeriesHeight3d


CalcSize3DWalls method See also
See Also

TChart.CalcSize3D

TChart.Width3d

TChart.Height3d

TChart.SeriesWidth3d

TChart.SeriesHeight3d


CalcXYIncrement Method

See also

Applies to

TChartAxis component

Declaration

function CalcXYIncrement : Double;

Description

The CalcXYIncrement function returns the distance between axis labels expressed in axis scales.

This function applies to both Chart BottomAxis and TopAxis axis components.

Basically this function calculates the most appropiate Increment to make Axis labels not overlapping.

The TChartAxis.Increment property is used as a first increment to try. If Labels will overlap, a new and bigger increment is applied until labels fit on axis dimensions.

The TChartAxis.LabelsSeparation controls the minimum amount of allowed distance between axis labels.

This function is called internally so you'll need to use in very special situations.


CalcXYIncrement method See also
See Also

TChartAxis.LabelsSeparation


CalcXPos Method (TChartSeries)
CalcXPos Method

See also	Example

Applies to

TChartSeries component

Declaration

function CalcXPos( ValueIndex : Longint ) : LongInt;

Description

Returns the pixel Screen Horizontal coordinate of the ValueIndex Series value.

This coordinate is calculated using the Series associated Horizontal Axis.


CalcXPos Method (TChartSeries) Example
CalcXPos Example

We want to know which is the Horizontal Screen coordinate of the 4th Series point:

tmp := LineSeries1.CalcXPos( 3 ) ; (remember points start at 0)


CalcXPos method See also
See Also

TChart.CalcPospoint

TChartSeries.CalcYPos


CalcXPosValue Method (TChartAxis)
CalcXPosValue Method

See also	Example

Applies to

TChartAxis component

Declaration

function CalcXPosValue(Const Value : Double) : Longint;

Description

This function calculates the Horizontal coordinate in pixels of Value parameter.


CalcXPosValue Method (TChartAxis) Example
CalcXPosValue Example

Our bottom axis has a Minimum of 20 and a Maximum of 1000.

We need to draw a vertical line that represents the value: 500.

x := Chart1.BottomAxis.CalcXPosValue( 500 ) ;

Chart1.Canvas.MoveTo ( x , Chart1.ChartRect.Bottom );

Chart1.Canvas.LineTo ( x , Chart1.ChartRect.Top );


CalcXPosValue Method (TChartAxis) See also
See Also

CalcYPosValue function

CalcXSizeValue function

CalcYSizeValue function


CalcXPosValue Method (TChartSeries)
CalcXPosValue Method

See also	Example

Applies to

TChartSeries component

Declaration

function CalcXPosValue( Const Value : Double ) : Longint ;

Description

Returns the pixel Screen Horizontal coordinate of the specified Value.

This coordinate is calculated using the Series associated Horizontal Axis.


CalcXPosValue Method (TChartSeries) Example
CalcXPosValue Method Example

We want to know which is the Horizontal Screen coordinate of 1234.56 value:

tmp := LineSeries1.CalcXPosValue( 1234.56 ) ;


CalcXSizeValue Method (TChartAxis)

See also

Applies to

TChartAxis component

Declaration

function CalcXSizeValue(Const Value : Double) : Longint;

Description

This function calculates the Horizontal SIZE in pixels of Value parameter.


CalcXSizeValue Method (TChartSeries)

See also	Example

Applies to

TChartSeries component

Declaration

function CalcXSizeValue( Const Value : Double ) : Longint ;

Description

Returns the pixel Screen Horizontal DIMENSION (or size) of the specified Value.

This coordinate is calculated using the Series associated Horizontal Axis.


CalcXSizeValue Method (TChartSeries) Example

We want to know how much Screen pixels size corresponds to a 12.1 X value:

tmp := LineSeries1.CalcXSizeValue( 12.1 ) ;

That means tmp is the quantity of horizontal pixels an offset of 12.1 needs.


CalcXSizeValue method (TChartAxis) See also
See Also

CalcYSizeValue function

CalcXPosValue function

CalcYPosValue function


CalcYPos Method (TChartSeries)

See also	Example

Applies to

TChartSeries component

Declaration

function CalcYPos( ValueIndex : Longint ) : Longint ;

Description

Returns the pixel Screen Vertical coordinate of the ValueIndex Series value.

This coordinate is calculated using the Series associated Vertical Axis.


CalcYPos Method (TChartSeries) Example

We want to know which is the Vertical Screen coordinate of the 22nd Series point:

tmp := LineSeries1.CalcYPos( 21 ) ; (remember points start at 0)


CalcYPos method See also
See Also

TChart.CalcPospoint

TChartSeries.CalcYPos


CalcYPosValue (TChartAxis) See also
See Also

CalcXPosValue function

CalcXSizeValue function

CalcYSizeValue function


CalcYPosValue Method (TChartAxis)
CalcYPosValue Method

See also

Applies to

TChartAxis component

Declaration

function CalcYPosValue(Const Value : Double) : Longint;

Description

This function calculates the Vertical coordinate in pixels of Value parameter.


CalcYPosValue Method (TChartSeries)

Applies to

TChartSeries component

Declaration

function CalcYPosValue(Const Value : Double) : Longint;

Description

Returns the pixel Screen Vertical coordinate of the specified Value.

This coordinate is calculated using the Series associated Vertical Axis.


CalcYSizeValue (TChartAxis) See also
See Also

CalcXPosValue function

CalcYPosValue function

CalcXSizeValue function


CalcYSizeValue Method (TChartAxis)
CalcYSizeValue Method

See also

Applies to

TChartAxis component

Declaration

function CalcYSizeValue(Const Value : Double) : Longint;

Description

This function calculates the Vertical SIZE in pixels of Value parameter.


CalcYSizeValue Method (TChartSeries)

See also	Example

Applies to

TChartSeries component

Declaration

function CalcYSizeValue(Const Value : Double) : Longint;

Description

Returns the pixel Screen Vertical DIMENSION (or size) of the specified Value.

This coordinate is calculated using the Series associated Vertical Axis.


CalcYSizeValue Method (TChartSeries) Example

We want to know how much Screen pixels size corresponds to a 5.32 Y value:

tmp := LineSeries1.CalcYSizeValue( 5.32 ) ;

That means tmp is the quantity of vertical pixels an offset of 5.32 needs.


CalcZOrder Method

See also

Applies to

TChartSeries component

Declaration

procedure CalcZOrder; virtual;

Description

The CalcZOrder method calculates the "Z" Series position (ZOrder).

This is the order Series are drawn at 3D mode. Series with bigger ZOrder are drawn FIRST.

If Chart.View3D property is False, all Series will calculate their ZOrder as zero (no ZOrder).

This method is called internally.

The ApplyZOrder property forces, when False, to draw all Series at same ZOrder position.


CalcZOrder method See also
See Also

TChartSeries.ZOrder

TChart.ApplyZOrder

TChart.MaxZOrder


CancelMouse property Example

procedure TGanttForm.Series1Click(Sender: TChartSeries; ValueIndex: Longint; Button: TMouseButton; Shift: TShiftState; X, Y: Integer);

begin

if Button=mbLeft then

With sender do

ValueColorValueIndex)

else

Chart1.CancelMouse:=False;

{Setting CancelMouse to True notifies TeeChart Engine to STOP handling the mouseclick and NOT start zoom or scroll.}

end;

.


CancelMouse Property

See also	Example

Unit

Chart

Applies to

All TeeChart components

Declaration

property CancelMouse : Boolean;

Description

Default: True

This public property substitutes the abort procedure call. If you wish the mouse to act with dual functionality, eg. Zoom or scroll with clickable series (see OnClickSeries event), then Cancelmouse should be used.

Set Cancelmouse to False in your mousehandling code to make TeeChart respond to mouse clicks with zoom or scroll.


CandleCh Unit

The CandleCh unit contains the declarations for the following components and for the enumerated type associated with them. When you add a component declared in this unit to a form, the unit is automatically added to the uses clause of that form's unit. The following items are declared in the this unit:

Components

TCandleSeries

TVolumeSeries

Types

TCandleStyle

Routines

To see a listing of items declared in this unit including their declarations, use the ObjectBrower.


CandleStyle Property

See also

Applies to

TCandleSeries component

Declaration

property CandleStyle : TCandleStyle;

Description

Default Value: csCandleStick

The CandleStyle property indicates how will be Candle points drawn. When it is csCandleStick, a vertical rectangle represents each candle point. When it is csCandleBar, a vertical line is drawn, among Open and Close horizontal tick marks. You can control both the candle colors and width.


CandleStyle property See also
See Also

TCandleSeries.CandleWidth

TCandleSeries.ShowOpenTick

TCandleSeries.ShowCloseTick


CandleWidth Property

Applies to

TCandleSeries component

Declaration

property CandleWidth : Integer;

Description

Default value: 6

The CandleWidth property is the horizontal Candle Size. It is based on pixels for Screen charts.

When printing, this number is multiplied by the ratio between the Printer width and the Screen width.


CanvasChanged Method

Applies to

TChart, TDBChart components

Declaration

Procedure CanvasChanged(Sender:TObject);virtual;

Description


Caption Property

See also

Applies to

TChartAxisTitle component

Declaration

property Caption : String;

Description

The Caption property defines the string of text used to draw near to each Chart Axis. When empty, no Title is displayed. Use the Angle and Font properties to control Axis Title formatting.


Caption property See also
See Also

TChartAxis.Title

TChartAxisTitle.Font


Centered Property

See also

Applies to

TMovingAverageFunction component

Declaration

property Centered : Boolean;

Description

Default Value: False

The Centered property controls if the resulting Moving average points will be moved horizontally to the middle of the moving period.

By default it's False, meaning moving averages will be assigned the same horizontal coordinate as it's DataSource points.

When True, the middle position of the moving period will be calculate for each moving average point.


Centered property See also
See Also

TMovingAverageFunction.Weighted


ChangeHorizSize Method

See also

Applies to

TSeriesPointer component

Declaration

procedure ChangeHorizSize(NewSize : Integer);

Description

The ChangeHorizSize method modifies the current pointer horizontal size without forcing the Chart to repaint.

This is equivalent to use the TSeriesPointer.HorizSize property except it doesn't calls the Repaint method.

It is internally used by some series like TBubbleSeries and TCandleSeries.


ChangeHorizSize method See also
See Also

TSeriesPointer.HorizSize

TSeriesPointer.ChangeVertSize

TChartSeries.Repaint


ChangeStyle Method

See also

Applies to

TSeriesPointer component

Declaration

procedure ChangeStyle(NewStyle : TSeriesPointerStyle);

Description

The ChangeStyle method modifies the Pointer style without forcing the Chart to repaint.

This is equivalent to use the TSeriesPointer.Style property except it doesn't calls the Repaint method.


ChangeStyle method See also
See Also

TSeriesPointer.Style

TChartSeries.Repaint


ChangeVertSize Method

See also

Applies to

TSeriesPointer component

Declaration

procedure ChangeVertSize(NewSize : Integer);

Description

The ChangeVertSize method modifies the current pointer horizontal size without forcing the Chart to repaint.

This is equivalent to use the TSeriesPointer.VertSize property except it doesn't calls the Repaint method.

It is internally used by some series like TBubbleSeries and TCandleSeries.


ChangeVertSize method See also
See Also

TSeriesPointer.VertSize

TSeriesPointer.ChangeHorizSize

TChartSeries.Repaint


Chart Property

See also

Applies to

TQRChart component

Declaration

property Chart : TChart;

Description

The Chart property defines the TChart or TDBChart component to display on a TQRChart. TQRChart is an "interface" component. It must be associated to a TChart or TDBChart component using the Chart property.


Chart Scrolling and Panning

See also

TChart and TDBChart components allow, by default, runtime Scrolling. Users need to drag the mouse while holding the right mouse button pressed. You can deny Horizontal and / or Vertical scrolling by changing the Chart.AllowPanning property.

Example:

This will deny scrolling:

Chart1.AllowPanning := pmNone ;

You can also use: pmHorizontal,pmVertical or pmBoth

Scrolling speed depends on:

The number of Series and Series Points.

The Chart Width and Height.

The computer processor and Video card processor speed.

The Video resolution and number of colors.

The Windows version and the Video driver.

The speed when dragging the mouse !


Chart Scrolling and Panning See also
See Also

Chart Zooming

Chart Zooming by coding

Restoring Scroll and Zoom

TChart AllowPanning


Chart Unit

The Chart unit contains the declarations for the following components and for the enumerated type associated with them. When you add a component declared in this unit to a form, the unit is automatically added to the uses clause of that form's unit. The following items are declared in the this unit:

Components

TChart

TChartGradient

TChartWall

Types

AnimatedZoomFactor global variable

TChartClick

TChartClickAxis

TGradientDirection

TeeEraseBack

TeeScrollMouseButton global variable

TeeZoomMouseButton global variable

TTeeBackImageMode

Routines

GradientFill Method

To see a listing of items declared in this unit including their declarations, use the ObjectBrower.


Chart Zooming

See also

TChart enables to zoom at runtime by default. To Zoom a chart area, hold the left mouse button and drag mouse toward down/right. You'll see a rectangle around the selected area. Release the left mouse button to Zoom. You can continue zooming again and again.

To RESTORE (or UNDO) the zoom, drag a rectangle in the opposite direction (up/left).

TChart will rescale the axis Maximum and Minimum to show all dependent Series points. This is the default Zoom behaviour. You can activate/deactivate this feature by toggling the Chart.AllowZoom boolean property.

Example:

{ this will disable runtime zoom }

Chart1.AllowZoom := False;


Chart Zooming See also
See Also

How to Zoom a chart area by coding?

Restoring Zoom and Scroll

Chart Scrolling


Chart Zooming by Coding
How to Zoom a chart area by coding?

See also

Example 1:

Zoom an area with "pixel" coordinates:

Rect.Left  := 123 ;

Rect.Top   := 67 ;

Rect.Right := 175 ;

Rect.Bottom:= 100 ;

Chart1.ZoomRect( Rect );

Example 2:

Zoom an area with point value coordinates:

You need first to translate from value to pixel coordinates. To do so, you can use the Axis or Series components.

Rect.Left  := LineSeries1.CalcXPosValue( 22.5  ) ;

Rect.Top   := LineSeries1.CalcYPosValue( 5000 ) ;

Rect.Right := LineSeries1.CalcXPosValue( 57.6 ) ;

Rect.Bottom:= LineSeries1.CalcYPosValue( 15000 ) ;

Chart1.ZoomRect( Rect );


Chart property See also
See Also

TQRChart.TeePrintMethod


Chart3DPercent Property

See also

Applies to

TChart, TDBChart components

Declaration

property Chart3dPercent : Integer;

Description

Default value: 15

The Chart3DPercent property indicates the size ratio between Chart dimensions and Chart depth when Chart.View3D is True. You can specify a percent number from 1 to 100.


Chart3DPercent See also
See Also

TChart.View3D

TChart.View3DWalls

TChart.SeriesWidth3D

TChart.SeriesHeight3D

TChartSeries.ZOrder


ChartBounds Example

This code draws a frame around a Chart component:

procedure TForm1.Button1Click(Sender: TObject);

begin

  With Chart1,Canvas do

  begin

    Brush.Style:=bsClear;

    Pen.Color:=clRed;

    With ChartBounds do Rectangle(Left,Top,Right,Bottom);

  end;

end;


ChartBounds Property

See also	Example

Applies to

TChart component

Declaration

property ChartBounds : TRect;

Description

Run-time and read only. The ChartBounds property defines the rectangle dimension the last time the Chart was displayed. When drawing to Screen, it equals to the Left, Top, Width and Height properties. When drawing to Printer, it equals to the paper rectangle section where Chart is printed. You should always use the ChartBounds property. Never assume the Chart Left and Top coordinates are zero.


ChartBounds See also
See Also

TChart.ChartRect

TChart.ChartWidth

TChart.ChartHeight

TChart.PrintPartial

TChart.PrintRect


Chart editor

See also

Description

The Chart editor presents the means to configure both chart and data series.

Design-time only in TeeChart 3. The Chart editor is available at both design and runtime with TeeChart Pro.


Chart editor See also
See Also

TeeChart Gallery


ChartHeight Property

See also

Applies to

TChart, TDBChart component

Declaration

property ChartHeight : LongInt;

Description

Run-time and read only. The ChartHeight property indicates the total height in pixels between the Top and Bottom Chart Axis positions.

It is equal to:

ChartHeight:=ChartRect.Bottom-ChartRect.Top;

This IS NOT the same as Chart1.Height, because Chart margins, Axis margins, Legend width, etc are first substracted from the Chart vertical size.


ChartHeight See also
See Also

TChart.ChartRect

ChartWidth

ChartXCenter

ChartYCenter


ChartPreview Method

See also

Applies to

TChart, TDBChart component

Declaration

procedure ChartPreview(AForm: TForm; AChart: TChart);

Description

The new TChartPreview dialog allow Charts to be viewed on Screen matching as much as possible how they will look on the printer. The ChartPreview method (teeprevi.pas unit) shows a modal dialog with the specified Chart component. The end user can Print, change Printer properties, Paper Orientation and drag the Chart rectangle to any Paper position.


ChartPreview See also
See Also

TChart.Print

TChart.PrintResolution


ChartPrintRect Method

See also

Applies to

TChart component

Declaration

function ChartPrintRect : TRect;

Description

The ChartPrintRect function returns the printer rectangle coordinates after PrintMargins have been applied. Coordinates are expressed in Printer device units (printer pixels).


ChartPrintRect See also
See Also

TChart.PrintMargins


ChartRect Property

See also

Applies to

TChart component

Declaration

property ChartRect : TRect;

Description

Run-time and read only. The ChartRect property returns the screen coordinates of the chart axis bounding rectangle. That is, the rectangular space defined by the four Chart axis.

You must use ChartRect and ChartBounds when calculating custom drawing X Y positions. So, you should never asume Chart dimensions and origin are fixed values.


ChartRect property See also
See Also

TChart.ChartBounds

TChart.ChartWidth

TChart.ChartHeight

TChart.ChartXCenter

TChart.ChartYCenter

TChart.Draw


ChartRegionRect Example

You can use it, for example, to check whether mouse cursor is inside a 3D chart:

if PtInRect( ChartRegionRect, Point( x,y ) ) then ...


ChartRegionRect Method

See also	Example

Applies to

TChart component

Declaration

function ChartRegionRect : TRect;

Description

The ChartRegionRect is the bounding Chart axis rectangle:

Source:

Function TChart.ChartRegionRect:TRect;

Begin

  Result:=ChartRect;

  if View3D then

  Begin

    Inc(Result.Right,Width3d);

    Dec(Result.Top,Height3d);

  end;

end;


ChartRegionRect See also
See Also

TChart.ChartRect

TChart.Height3D

TChart.Width3D


ChartWidth Property

See also

Applies to

TChart component

Declaration

property ChartWidth : LongInt;

Description

Run-time and read only. The ChartWidth property indicates the total width in pixels between the Left and Right Chart Axis positions.

It is equal to:

ChartWidth:=ChartRect.Right-ChartRect.Left;

This IS NOT the same as Chart1.Width, because Chart margins, Axis margins, Legend width, etc are first substracted from the Chart horizontal size.


ChartWidth See also
See Also

TChart.ChartHeight

TChart.ChartRect

ChartXCenter

ChartYCenter


ChartXCenter Method

See also

Applies to

TChart, TDBChart components

Declaration

function ChartXCenter : Longint;

Description

This function returns the middle Horizontal coordinate of the Chart.

This IS NOT the same as Chart1.Width / 2, because Chart margins, Axis margins, Legend width, etc are first substracted from the Chart horizontal size.

i.e.: TPieSeries uses ChartXCenter for the Pie center.


ChartXCenter See also
See Also

ChartYCenter

ChartWidth


ChartYCenter Method

See also

Applies to

TChart, TDBChart components

Declaration

function ChartYCenter : Longint;

Description

This function returns the middle Vertical coordinate of the Chart.

This IS NOT the same as Chart1.Height / 2, because Chart margins, Axis margins, Legend width, etc are first substracted to the Chart vertical size.

i.e.: TPieSeries uses ChartYCenter for the Pie center.


ChartYCenter See also
See Also

ChartXCenter

ChartWidth


CheckDataSource Method

Applies to

TChartSeries component

Declaration

procedure CheckDataSource;

Description

The CheckDataSource method will refresh all Series point values, either from database Tables, Queries or another Series points. You can call this method regularly if you want new or modified data to appear in realtime in the Series. The parent Chart will be repainted to reflect any changes.


CircleBackColor Property

See also

Applies to

TCircledSeries component

Declaration

property CircleBackColor : TColor;

Description

Default: clTeeColor

The CircleBackColor determines the color to fill the ellipse. Setting it to clTeeColor indicates the CircledSeries to use to Chart.Color color.


CircleBackColor See also
See Also

TCircledSeries.PiePen

TChart.Color

TChartGradient


CircleXCenter Property

See also

Applies to

TCircledSeries component

Declaration

property CircleXCenter : LongInt;

Description

Run-time and read only. The CircleXCenter public property returns the exact ellipse's center horizontal position in pixels.

The ellipse's radius is determined by CircledSeries.XRadius and YRadius properties. The AngleToPos function converts from angles to X and Y Screen coordinates. The PointToAngle function converts from XY Screen positions to angles.


CircleXCenter See also
See Also

TCircledSeries.CircleYCenter

TCircledSeries.XRadius

TCircledSeries.YRadius

TCircledSeries.AngleToPos

TCircledSeries.PointToAngle


CircleYCenter Property

See also

Applies to

TCircledSeries component

Declaration

property CircleYCenter : LongInt;

Description

Run-time and read only. The CircleYCenter public property returns the exact ellipse's center vertical position in pixels. The ellipse's radius is determined by CircledSeries.XRadius and YRadius properties. The AngleToPos function converts from angles to X and Y Screen coordinates. The PointToAngle function converts from XY Screen positions to angles.


CircleYCenter See also
See Also

TCircledSeries.CircleXCenter

TCircledSeries.XRadius

TCircledSeries.YRadius

TCircledSeries.AngleToPos

TCircledSeries.PointToAngle


Circled Property

See also

Applies to

TCircledSeries component

Declaration

property Circled : Boolean;

Description

Default Value: False

The Circled property defines if a CircledSeries such as TPieSeries or TPolarSeries will be drawn elliptic or with same X and Y radius (circle).


Circled property See also
See Also

TCircledSeries.CircleBackColor

TCircledSeries.CustomXRadius

TCircledSeries.CustomYRadius

TCircledSeries.RotationAngle

TPieSeries

TPolarSeries


Clear Method

Applies to

TChartSeries component

Declaration

procedure Clear;

Description

This method deletes all Series values. Dependent Series are notified. If no new points are appended to the Series, nothing will be painted.


ClearList Method

Applies to

TChartValueList component

Declaration

procedure ClearList;

Description

This method removes all values from the List.


ClearPalette Example

This code creates a customized color Palette:

SurfaceSeries1.ClearPalette;

SurfaceSeries1.AddPalette( 1000, clRed );

SurfaceSeries1.AddPalette( 2000, clYellow );

SurfaceSeries1.AddPalette( 3000, clGreen );

SurfaceSeries1.Repaint;


ClearPalette Method

See also	Example

Applies to

TSurfaceSeries component

Declaration

procedure ClearPalette;

Description

The ClearPalette method deletes all Palette information. Usually you should call AddPalette after calling ClearPalette.


ClearPalette See also
See Also

TSurfaceSeries.AddPalette


ClearValues Method

Applies to

TChartValueList component

Declaration

procedure ClearValues;

Description

This procedure will delete all values in the list and reset the MinValue, MaxValue and TotalABS variables.


Clicked Method (TChartAxis)
Clicked Method

Applies to

TChartAxis component

Declaration

function Clicked(x,y: Integer) : Boolean;

Description

This function returns if X and Y coordinates are close to the Axis position.


Clicked Method (TChartSeries)
Clicked Method

See also

Applies to

TChartSeries component

Declaration

function Clicked(x, y: Integer) : Longint; virtual;

Description

This functions returns the ValueIndex of the "clicked" point in the Series. Clicked means the X and Y coordinates are in the point screen region bounds. If no point is "touched", Clicked returns -1


Clicked Method (TChartSeries) See also
See Also

OnClick


Clicked Method (TChartTitle)
Clicked Method

Applies to

TChartTitle component

Declaration

function Clicked(x, y: Integer) : Boolean;

Description

.


Clip Property

Applies to

TSeriesMarks component

Declaration

property Clip : Boolean;

Description

The Clip boolean property toggles if Marks outside Chart limits will overwrite any other Chart region.

By default is True, meaning Marks will be drawn only within inner chart boundaries, keeping Axis Labels, Titles, Legend, etc almost untouched.


ClipPoints Property

Applies to

TChart, TDBChart components

Declaration

property ClipPoints : Boolean;

Description

ClipPoints boolean property toggles the drawing of Series points within Chart boundaries, preventing other Chart regions from being overwritten.


ClipRectangle Method

Applies to

TChart, TDBChart components

Declaration

Procedure ClipRectangle(Const Rect:TRect);virtual;

Description


CloseCircle Property

See Also

Applies to

TPolarSeries component

Declaration

property CloseCircle : Boolean;

Description

Default: True

The CloseCircle property determines if a Line will be drawn between the last and first PolarSeries point coordinates. If True, the PolarSeries polygon is closed.


CloseCircle See also
See Also

TPolarSeries.Pen

TPolarSeries.Pointer


CloseValues Property

See also	Example

Applies to

TOHLCSeries component

Declaration

property CloseValues : TChartValueList;

Description

The CloseValues property is used to store all Stock market Close values.

You can access Close values in the same way you can access X or Y values.


CloseValues property Example

Example:

{ this increments the 6th Candle Close value }

With CandleSeries1 do

begin

CloseValues[ 5 ] := CloseValues[ 5 ] + 1 ;

Repaint;

end;


CloseValues property See also
See Also

TOHLCSeries.DateValues

TOHLCSeries.HighValues

TOHLCSeries.LowValues

TOHLCSeries.OpenValues


Color Property (TChart)
Color Property

See also

Applies to

TChart, TDBChart components

Declaration

property Color : TColor;

Description

The Color property is the Color used to fill the complete Chart Panel background.


Color Property (TChartLegend)

Applies to

TChartLegend component

Declaration

property Color : TColor;

Description

Default Value: clWhite

The Color property defines the color used to fill Legend's background space.


Color Property (TChartPen)

Applies to

TChartPen component

Declaration

property Color : TColor;

Description

The Color property determines the color used by the pen to draw lines on the canvas.

The Color property can be any valid Delphi color constant like clRed, clGreen, clBtnText, etc.

A special color constant unique to TeeChart is: clTeeColor This is the "default color".

Each TeeChart drawing object has a different default color. For example, the TChart.Frame property has a default color of clBlack.


Color Property (TChartWall)

See also

Applies to

TChartWall component

Declaration

property Color : TColor;

Description

Default clTeeColor

The Color property specifies the color used to fill the Chart Walls background. The Chart.View3DWalls property should be True to make walls visible. Setting it to clTeeColor means TeeChart will use the Chart.BackColor.


Color property (TChart) See also
See Also

Chart BackColor property


Color property (TChartWall) See also
See Also

TChart.BackColor

TChart.View3DWalls

TChartWall.Brush

TChartWall.Pen


Color3D Property

See also

Applies to

TPieSeries component

Declaration

property Color3D : Boolean;

Description

Default Value: True

The Color3D property controls if the Pie 3D zone will be filled or not.


Color3D property See also
See Also

TPieSeries.ShadowColor

TPieSeries.Shadowed3d


ColorEachPoint Property

Applies to

TChartSeries component

Declaration

property ColorEachPoint : Boolean;

Description

Default value: False.

The TChartSeries ColorEachPoint property is a boolean property that controls which color will be drawn on the Series points. If False, all points will be drawn using the Series SeriesColor color property. If True, each Series point will be "colored" with its corresponding point color. The point colors are stored in the TChartSeries.ValueColor array property. If a point has a clTeeColor color value, then a palette color value will be used to draw it.

You can change this property both at design and runtime:

LineSeries1.ColorEachPoint := True ;


ColorPalette Constant Array
ColorPalette Constant Array Property

Unit

TeEngine

Declaration

ColorPalette : Array[1..MaxDefaultColors] of TColor = (clRed, clGreen, clYellow, clBlue, clWhite, clGray, clFuchsia, clTeal, clNavy, clMaroon, clLime, clOlive, clPurple, clSilver, clAqua, clBlack);

Description


ColorRange Example

Imagine we have a LineSeries with ten years of data and we want the year 1993 to be in clBlue color:

Then we call:

LineSeries1.ColorRange( LineSeries1.XValues, EncodeDate(1993,1,1), EncodeDate(1993,12,31),

clBlue);

Imagine now we want all Y Values greater than 100 to be clYellow :

LineSeries1.ColorRange( LineSeries1.YValues, 100, LineSeries1.MaxYValue, clYellow);

Did you like it ? Try it !


ColorRange Method

See also	Example

Applies to

TChartSeries component

Declaration

procedure ColorRange(AValueList: TChartValueList ;Const FromValue, ToValue: Double; AColor: TColor);

Description

This method will change the Color of a specified range of points.

The FromValue and ToValue parameters are the beginning and end of the specified AValueList range.

AValueList can be any Series ValueList such as: XValues, YValues, etc.


ColorSource Property

Applies to

TChartSeries component

Declaration

property ColorSource : String;

Description

The ColorSource property must be a valid numeric Data Field Name.

TDBChart assigns every point's color to the ColorSource field value.

Color Values in Tables or Querys must be expressed as RGB values.


ColorWidth Property

See also

Applies to

TChartLegend component

Declaration

property ColorWidth : Integer;

Description

Default Value: 12

The ColorWidth property defines the width of Legend marks in percent of total Legend width. Each Series is shown in Chart Legend both with text and color mark. The color mark is a different shape for each different Series type.


ColorWidth See also
See Also

TChartLegend.Color


ConnectingPen Property

See also

Applies to

TGanttSeries component

Declaration

property ConnectingPen : TChartPen;

Description

The ConnectingPen property determines the kind of pen used to draw the optional lines that connect Gantt Bars.

Gantt Bars are "connected" by using the TGanttSeries.NextTask property.


ConnectingPen property See also
See Also

TGanttSeries.NextTask


CopyToClipboardBitmap Method

Applies to

TChart, TDBChart components

Declaration

Procedure CopyToClipboardBitmap;

Description

Copies the whole Chart area to clipboard in bitmap format.


CopyToClipboardMetafile Method

Applies to

TChart, TDBChart components

Declaration

Procedure CopyToClipboardMetafile(Enhanced:Boolean);

Description

Copies the whole chart area to the clipboard in metafile format. You may specify either Windows Metafile (WMF) or Enhanced Metafile (EMF) using the boolean operator.

Eg. Chart1.CopyToClipboardMetafile(True);

{ Enhanced Metafile = True }


Count Example

You can, for example, use this value to iterate:

for t := 0 to LineSeries1.Count - 1 do

LineSeries1.ValueColor [ t ] := clRed ;


Count Method (TChartSeries)
Count Method

Example

Applies to

TChartSeries component

Declaration

function Count : Longint;

Description

This function returns the number of points in the Series.


Count Method (TChartValueList)
Count Method

Example

Applies to

TChartValueList component

Declaration

function Count : Longint;

Description

This function returns the number of values in the List.


Count Method (TChartValueList) Example

You can, for example, use this function to locate a specific value:

for t := 0 to LineSeries1.YValues.Count - 1 do

if  LineSeries1.YValue[ t ] = 1234.56 then

LineSeries1.ValueColor[ t ] := clYellow ;


CreateDefaultPalette Example

This code makes a more precisely color palette:

SurfaceSeries1.CreateDefaultPalette( 100 ) ;

SurfaceSeries1.UsePalette := True ;

SurfaceSeries1.Repaint ;


CreateDefaultPalette Method

See also	Example

Applies to

TSurfaceSeries component

Declaration

procedure CreateDefaultPalette(NumSteps : Longint);

Description

The CreateDefaultPalette creates a multi-color Palette used to fill Surface polygons. The NumSteps parameter defines the number of different colors in the Palette.


CreateDefaultPalette See also
See Also

TSurfaceSeries.UsePalette

TSurfaceSeries.AddPalette


CreateValues Example

This line doubles the Surface grid size:

With SurfaceSeries1 do

  CreateValues( 2*NumXValues, 2*NumZValues ) ;


CreateValues Method

See also	Example

Applies to

TSurfaceSeries component

Declaration

procedure CreateValues(NumX, NumZ : Longint);

Description

The CreateValues method makes a Surface grid of NumX by NumZ dimensions. For each grid point, the OnGetYValue event is called to allow the user to supply the corresponding Y value.


CreateValues See also
See Also

TSurfaceSeries.ReCreateValues

TSurfaceSeries.OnGetYValue


Cursor Example

You can also use the crTeeHand cursor image:

LineSeries1.Cursor:=crTeeHand ;


Cursor Property

See also	Example

Applies to

TChartSeries component

Declaration

property Cursor : TCursor;

Description

Default: crDefault

The Cursor property is the image used when the mouse passes into the region covered by a Series point. Each Series determines the intersection of points with mouse coordinates each time the mouse moves. There are many different Cursors available. Refer to the Delphi help file. The Series ZOrder determines the order in which Series will be examined to calculate the clicked Series point.


Cursor See also
See Also

TChartSeries.Clicked


CurvFitt Unit

The CurvFitt unit contains the declarations for the following components and for the enumerated type associated with them. When you add a component declared in this unit to a form, the unit is automatically added to the uses clause of that form's unit. The following items are declared in the this unit:

Components

TCurveFittingFunction

Types

Routines

To see a listing of items declared in this unit including their declarations, use the ObjectBrower.


CustomBarHeight Example

HorizBarSeries1.CustomBarHeight := HorizBarSeries1.BarHeight * 2 ;


CustomBarHeight Property

See also	Example

Applies to

THorizBarSeries component

Declaration

property CustomBarHeight : Integer;

Description

Default: 0

The CustomBarHeight property determines the fixed Bar height in pixels. You can use the BarHeight property to get the current Bar height in pixels.


CustomBarHeight See also
See Also

THorizBarSeries.BarHeight

THorizBarSeries.SideMargins

TCustomBarSeries.BarWidthPercent


CustomBarWidth Example

BarSeries1.CustomBarWidth := BarSeries1.BarWidth + 5 ;


CustomBarWidth Property

See also	Example

Applies to

TBarSeries component

Declaration

property CustomBarWidth : Integer;

Description

Default: 0

The CustomBarWidth property determines the fixed Bar width in pixels. You can use the BarWidth property to get the current Bar width in pixels.


CustomBarWidth See also
See Also

TBarSeries.BarWidth

TBarSeries.SideMargins

TCustomBarSeries.BarWidthPercent


CustomDraw method Example

Example draws 2 new axis

procedure TCustomAxisForm.LineSeries1AfterDrawValues(Sender: TObject);

var posaxis:longint;

begin

  With Chart1 do

  begin

    PosAxis:=ChartRect.Left+Trunc(ChartWidth*Percent/100.0);

    LeftAxis.CustomDraw(posaxis-10,posaxis-40,posaxis,DrawGrid.Checked);

    PosAxis:=ChartRect.Top+Trunc(ChartHeight*Percent/100.0);

    BottomAxis.CustomDraw(posaxis+10,posaxis+40,posaxis,DrawGrid.Checked);

  end;

end;


CustomDraw Method

See also	Example

Applies to

TChartAxis component

Declaration

Procedure CustomDraw(PosLabels, PosTitle, PosAxis: LongInt; GridVisible: Boolean);

Description

The CustomDraw method displays an Axis at the specified screen positions with the current axis scales.

This method can be used in very special Charting applications, as it involves quite good TeeChart internals knowledge.

For normal charting the TChart component provides two horizontal and two vertical axis that are output to the screen automatically.

This method stores the Axis old positions, draws the Axis and restores the positions again.

The PosLabels, PosTitle and PosAxis parameters determine the Axis Labels, Title and Axis positions.

For horizontal Axis like TopAxis or BottomAxis, these positions are in vertical screen coordinates.

For vertical Axis like LeftAxis or RightAxis, these positions are in horizontal screen coordinates.

The GridVisible parameter determine if the Axis should draw or not the grid lines from the axis to chart edges.

The Axis is drawn using the current formatting properties such as fonts, ticks and colors.


CustomDraw Method See also
See Also

TChartAxis.CustomDrawMinMax

TChartAxis.Increment

TChartAxis.LabelsSize

TChartAxis.Maximum

TChartAxis.Minimum

TChartAxis.Maximum

TChartAxis.PosAxis

TChartAxis.PosLabels

TChartAxis.PosTitle

TChartAxis.TitleSize


CustomDrawMinMax Method

See also

Applies to

TChartAxis component

Declaration

Procedure CustomDrawMinMax(PosLabels, PosTitle, PosAxis: LongInt; GridVisible: Boolean; Const AMinimum, AMaximum, AIncrement: Double);

Description

The CustomDrawMinMax method displays an Axis at the specified screen positions with the specified axis scales.

This method can be used in very special Charting applications, as it involves quite good TeeChart internals knowledge.

For normal charting the TChart component provides two horizontal and two vertical axis that are output to the screen automatically.

This method stores the Axis old scales and positions, draws the Axis and restores everything again.

The PosLabels, PosTitle and PosAxis parameters determine the Axis Labels, Title and Axis positions.

For horizontal Axis like TopAxis or BottomAxis, these positions are in vertical screen coordinates.

For vertical Axis like LeftAxis or RightAxis, these positions are in horizontal screen coordinates.

The GridVisible parameter determine if the Axis should draw or not the grid lines from the axis to chart edges.

The AMinimum,AMaximum and AIncrement parameters define the Axis Minimum, Maximum and Increment properties.

The Axis is drawn using the current formatting properties such as fonts, ticks and colors.


CustomDrawMinMax Method See also
See Also

TChartAxis.CustomDraw

TChartAxis.Increment

TChartAxis.LabelsSize

TChartAxis.Maximum

TChartAxis.Minimum

TChartAxis.PosAxis

TChartAxis.PosLabels

TChartAxis.PosTitle

TChartAxis.TitleSize


CustomXRadius Property

See also

Applies to

TCircledSeries component

Declaration

property CustomXRadius : LongInt;

Description

Default 0

The CustomXRadius property indicates the amount in horizontal pixels used to calculate ellipse bounds. Setting it to zero means the CircledSeries will automatically calculate the adequate ellipse radius when necessary.


CustomXRadius See also
See Also

TCircledSeries.XRadius

TCircledSeries.YRadius

TCircledSeries.CustomYRadius

TCircledSeries.Circled


CustomYRadius Property

See also

Applies to

TCircledSeries component

Declaration

property CustomYRadius : LongInt;

Description

Default 0

The CustomYRadius property indicates the amount in vertical pixels used to calculate ellipse bounds. Setting it to zero means the CircledSeries will automatically calculate the adequate ellipse radius when necessary.


CustomYRadius See also
See Also

TCircledSeries.XRadius

TCircledSeries.YRadius

TCircledSeries.CustomXRadius

TCircledSeries.Circled


DBChart Unit

The DBChart unit contains the declarations for the following components and for the enumerated type associated with them. When you add a component declared in this unit to a form, the unit is automatically added to the uses clause of that form's unit. The following items are declared in the this unit:

Components

TDBChart

Types

Routines

To see a listing of items declared in this unit including their declarations, use the ObjectBrower.


Dark3D Property (TBarSeries)
Dark3D Property

See also

Applies to

TBarSeries and THorizBarSeries components

Declaration

property Dark3D : Boolean;

Description

Default True

The Dark3D property controls if bar sides will be filled with shadowed colors. This has effect only when Chart.View3D is True. High color video modes (greater than 256 colors) will show dark colors much better than 256 or 16 color modes.


Dark3D Property (TPieSeries)

See also

Applies to

TPieSeries component

Declaration

property Dark3D : Boolean;

Description

Default True

The Dark3D property indicates, when True, to fill the Pie 3D effect screen areas with darker colors than their corresponding Pie sectors. This colors look much better with 16k colors video mode or greater.

The Pie sector RGB color is increased 40 units to obtain the darker color.


Dark3D property (TBarSeries) See also
See Also

TCustomBarSeries.BarBrush

TChart.View3D

TChart.IsScreenHighColor


Dark3D property (TPieSeries) See also
See Also

TPieSeries.Shadowed3D

ApplyDark global function


DarkColor Property

See also	Example

Applies to

TCustomBarSeries component

Declaration

property DarkColor : TColor;

Description

Run-time, read only. The DarkColor property returns the color used to fill the Bar sides or top cover. This applies both to TBarSeries and THorizBarSeries components. DarkColor and DarkerColor are used toghether to create a better visual effect.

First, the normal Bar color is converted to it's Red, Green and Blue values. Then, the normal Bar color is incremented by the following constant values:

Const DarkerColorQuantity=40;

      DarkColorQuantity  =30;

Every Bar series style (Cyllinder, Pyramid, etc) will use DarkColor and DarkerColor for different visual parts.

For better visual results, you should install the video driver at a color resolution GREATER than 256 colors.

The TChart.IsScreenHighColor function returns if current video mode is a valid mode for better results.

You can change the above RGB constants to obtain lighter or darker results:


DarkColor property Example

DarkerColorQuantity:=20;

DarkColorQuantity:=10;

BarSeries1.Repaint;


DarkColor property See also
See Also

TChart.IsScreenHighColor


DarkerColor Property

Applies to

TCustomBarSeries component

Declaration

property DarkerColor : TColor;

Description

Run-time, read only. The DarkerColor property returns the color used to fill the Bar sides or top cover. This applies both to TBarSeries and THorizBarSeries components. DarkColor and DarkerColor are used toghether to create a better visual effect.

First, the normal Bar color is converted to it's Red, Green and Blue values. Then, the normal Bar color is incremented by the following constant values:

Const DarkerColorQuantity=40;

      DarkColorQuantity  =30;

Every Bar series style (Cyllinder, Pyramid, etc) will use DarkColor and DarkerColor for different visual parts.

For better visual results, you should install the video driver at a color resolution GREATER than 256 colors.

The TChart.IsScreenHighColor function returns if current video mode is a valid mode for better results.

You can change the above RGB constants to obtain lighter or darker results:


DataSource Property

 Example

Applies to

TChartSeries component

Declaration

property DataSource : TComponent;

Description

Any TChartSeries can be optionally connected to a "point provider" (or DataSource). The "point provider" (or DataSource) can be:

1) Another Chart Series.

2) Any TTable, TQuery, TClientDataset or Delphi database dataset.

3) New ways of data feeding in the future. (WWW, dde,... )

Points must be manually added by coding if no DataSource component is specified.

Because AddPie calls to the "standard" Chart Series AddY method.

Please refer to Line, Bar, Point, Area, Bubble, Gantt, Candle, etc for particular point insertion methods.


DataSource property Example

Points must be manually added by coding if no DataSource component is specified.

Example of manual point adding:

Begin

PieSeries1.Clear;

for t :=  1 to 12 do

PieSeries1.Add( Random(1000), LongMonthNames[t], clTeeColor) ;

End;


DataSources Property

See also	Example

Applies to

TChartSeries component

Declaration

property DataSources : TList read FDataSources;

Description

.


DateTime Example

LineSeries1.XValues.DateTime := False ; (we have X numbers, not DateTime X values)

BubbleSeries1.RadiusValues.DateTime := True ;

At runtime, you can manually set the values accordingly:

LineSeries1.XValues.Value[5]:=EncodeTime(23,59,00);

if LineSeries1.XValues.DateTime equals True.

Or...

LineSeries1.XValues.Value[5]:=1234.567;

if LineSeries1.XValues.DateTime equals False. However, no type checking is performed, so both ways will work.


DateTime Property See also
See Also

TChartSeries.ExactDateTime

TChartAxis.DateTimeFormat


DateTime Property

See also 	Example

Applies to

TChartValueList component

Declaration

property DateTime : Boolean;

Description

TeeChart allows values to be expressed either as numbers or as Date+Time values. Delphi considers DateTime values as Doubles, thus making easier to handle both kinds of values. Each Series value list has a boolean property called DateTime. . The boolean DateTime property tells TeeChart what type the numbers are.The horizontal (x axis) and vertical (y axis) value defaults are number format (DateTime False). DateTime can be changed both at design-time and run-time, forcing the Chart to repaint. This property is used whenever a value must be converted to text, for example, to draw it as the chart axis labels. Axis labels will be drawn in DateTime or numeric format accordingly to the setting of the DateTime property.

You can also set the Chart Series ValueFormat and the Chart Axis DateTimeFormat formatting strings, to control how the values will be displayed.


DateTimeFormat Example

Chart1.BottomAxis.DateTimeFormat:='dd/mm/yy';

See Delphi help under FormatDateTime Function for complete details.


DateTimeFormat Property See also
See Also

TChartAxis.Increment

TChartSeries.XValues

TChartSeries.YValues

TChartAxis.ExactDateTime

TChartValueList.DateTime


DateTimeFormat Property

See also	Example

Applies to

TChartAxis component

Declaration

property DateTimeFormat : String;

Description

Chart Axis have a DateTimeFormat property. DateTimeFormat is a standard Delphi DateTime formatting string specifier. Chart Axis uses it to draw the axis labels.


DateValues Property

See also	Example

Applies to

TOHLCSeries component

Declaration

property DateValues : TChartValueList;

Description

The DateValues property is used to store all Stock market Date values. You can access Date values in the same way you can access X or Y values.


DateValues property Example

{ this code returns the Stock market Date with bigger Open value }

Var tmp:Double;

t : Longint;

tmpDate : TDateTime;

tmp:=0;

With CandleSeries1 do

if Count > 0 then

begin

for t:= 0 to Count - 1 do

begin

if (t=0) or ( OpenValues[ t ] > tmp ) then

begin

tmp:=OpenValues[ t ];

tmpDate:=DateValues[ t ];

end;

end;

ShowMessage( DateToStr( tmpDate ) );

end;


DateValues property See also
See Also

TOHLCSeries.CloseValues

TOHLCSeries.HighValues

TOHLCSeries.LowValues

TOHLCSeries.OpenValues


Delete Example

We want to delete the 8th point of a Line Series:

LineSeries1.Delete( 7 ) ; (remember, points index start at zero)

This will remove completely the 8th point in the LineSeries1 Series. The chart will be repainted and all dependent Series (whom DataSource is LineSeries1) will be recalculated and redrawn.


Delete Method (TChartSeries)
Delete Method

Example

Applies to

TChartSeries component

Declaration

procedure Delete(ValueIndex : LongInt);

Description

The Delete method will remove the # ValueIndex point from the Series values lists. The ParentChart will be automatically redrawn. Dependent Series will be recalculated.


Delete Method (TChartValueList)

Applies to

TChartValueList component

Declaration

procedure Delete( ValueIndex : Longint);

Description

This method removes the specified ValueIndex value from the List.


DesignMaxPoints Property

Applies to

TChartSeries component

Declaration

property DesignMaxPoints : LongInt;

Description

The DesignMaxPoints integer property is the maximum number of points in design mode the Series will accept.

The default value is 200. Setting to 0 means there is no limit on the number of points. This property has no effect at runtime.

When you are dealing with DBChart components, and connecting Series to Tables or Querys, it can take a long time to retrieve and process all records. Setting DesignMaxPoints property to for example, 100, will reduce at design time the number of retrieved records to 100. That can speed design time development. Setting DesignMaxPoints to 0 will not limit the design time added points.


Direction Property

See also

Applies to

TChartGradient component

Declaration

property Direction : TGradientDirection;

Description

Default: gdTopBottom

The Direction property specifies the direction the gradient fill will be applied.


Direction See also
See Also

TChartGradient.EndColor

TChartGradient.StartColor

TChartGradient.Visible


DividingLines Property

Applies to

TChartLegend component

Declaration

property DividingLines : TChartHiddenPen read FDividingLines write SetDividingLines;

Description

.


DoRectangle Method

See also

Applies to

TChart component

Declaration

procedure DoRectangle(Const Rect : TRect);

Description

The DoRectangle method calls the Chart.Canvas.Rectangle method passing the Rect variable parameter. It is equivalent to:

Canvas.Rectangle( Rect.Left, Rect.Top, Rect.Right, Rect.Bottom ) ;


DoRectangle See also
See Also

TChart.Canvas


DoSeriesClick Method

See also

Applies to

TChartSeries component

Declaration

procedure DoSeriesClick( ValueIndex:Longint; Button:TMouseButton; Shift: TShiftState; X, Y: Integer); virtual;

Description

The DoSeriesClick method calls the Series OnClick event (if assigned).

Use the CancelMouse property to control how the mouse button behaves with dual modes (scroll or zoom after a Series OnClick event).


DoSeriesClick method See also
See Also

TChartSeries.OnClick


DotFrame Property

Applies to

TSurfaceSeries component

Declaration

property DotFrame : Boolean;

Description

Default False

This property sets the TSurfaceSeries to display as a grid of dots (pixels). Its very similar to the WireFrame mode except that no lines connect the Surfaces points.


DownCloseColor Example

You can change both at design or runtime the color values:

CandleSeries2.UpCloseColor   := clGreen ;

CandleSeries2.DownCloseColor := clYellow ;

That will force to repaint the Chart component containing CandleSeries2.


DownCloseColor Property

See also	Example

Applies to

TCandleSeries component

Declaration

property DownCloseColor : TColor;

Description

By default, UpCloseColor is clWhite and DownCloseColor is clRed.

Each Candle will be filled with a different color depending its Open and Close values.

If Open value is greater than Close value, then the selected color will be the UpCloseColor color property.

If Close value is greater or equal than Open value, then the selected color will be the DownCloseColor color property.


DownCloseColor See also
See Also

UpCloseColor


Draw Example

Printer.BeginDoc ;

Chart1.Draw( Printer.Canvas , MyRectangle ) ;

Printer.EndDoc ;

Where "MyRectangle" could be any valid rectangular region for the canvas.

MyRectangle.Left  := 0 ;

MyRectangle.Right := Printer.PageWidth div 2 ;

MyRectangle.Top   := 0 ;

MyRectangle.Bottom:= Printer.PageHeight div 3 ;


Draw Method (TChart)
Draw Method

Example

Applies to

TChart, TDBChart components

Declaration

procedure Draw ( UserCanvas : TCanvas ; Const UserRect : TRect ) ; virtual ;

Description

Use the Draw method to paint the Chart in your preferred Canvas and region.

It can also be used to Print the Chart in a customized way:


Draw Method (TChartAxis)

Applies to

TChartAxis component

Declaration

procedure Draw;

Description

This method paints the complete Axis (Ticks, Grid, Labels, Title) using the Axis.ParentChart.Canvas. Normally you do not need to call the Draw method directly.


Draw Method (TSeriesPointer)

See also

Applies to

TSeriesPointer component

Declaration

Procedure Draw(px, py : Integer; ColorValue : TColor; AStyle : TSeriesPointerStyle );

Description

The Draw method displays a pointer at the specified px and py screen pixel coordinates.

The pointer is drawn using the current HorizSize and VertSize dimensions.

It calls the TSeriesPointer.DrawPointer method.


Draw method (TSeriesPointer) See also
See Also

TSeriesPointer.DrawPointer


Draw3D Property

See also

Applies to

TSeriesPointer component

Declaration

property Draw3D : Boolean;

Description

Default Value: True

The Draw3D property controls if Series Pointers will be drawn in a 3D way or not. Currently only rectangle points have 3D capability.


Draw3D property See also
See Also

TSeriesPointer.Style

TSeriesPointer.Brush


DrawArea Property

See also

Applies to

TCustomSeries component

Declaration

property DrawArea : Boolean;

Description

Default Value: False

The DrawArea property defines if bottom Chart side of points will be filled with a defined color. LineSeries and PointSeries set DrawArea to False. AreaSeries set DrawArea to True. You can control the Area Brush style by using the AreaBrush property.


DrawArea property See also
See Also

TAreaSeries.SeriesColor

TAreaSeries.AreaBrush

TAreaSeries.AreaColor

TAreaSeries.AreaLinesPen


DrawHorizontalLabel Method

Applies to

TChartAxis component

Declaration

procedure DrawHorizontalLabel(x,y:Longint; Angle:Integer; Const St:String);

Description

Horizontal Axis (TopAxis and BottomAxis) use this method to draw labels and Axis Title. Angle parameter must be an integer value between 0 and 360. X and Y are the text position coordinates. Text will be aligned to Left, Right, Top and / or Bottom depending on the Axis. Angles different than 0, 90, 180 or 270 may need manual XY calculation.


DrawPointer Method

See also

Applies to

TSeriesPointer component

Declaration

procedure DrawPointer(px, py, tmpHoriz, tmpVert : Integer; ColorValue : TColor; AStyle : TSeriesPointerStyle);

Description

The Draw method displays a pointer at the specified px and py screen pixel coordinates with the tmpHoriz and tmpVert dimensions.


DrawPointer method See also
See Also

TSeriesPointer.Draw


DrawRing method Example
DrawRing Example

A sample code:

procedure TForm1.PolarSeries1AfterDrawValues(Sender:TObject);

begin

Chart1.Canvas.Brush.Style:=bsClear;

Chart1.Canvas.Pen.Color:clBlue;

PolarSeries.DrawRing(444);

Chart1.Canvas.Pen.Color:clGreen;

PolarSeries1.DrawRing(333);

end;

333 and 444 are example values. These values should be between PolarSeries1 minimum and maximum values.


DrawRing Method

Example

Applies to

TPolarSeries component

Declaration

Procedure TPolarSeries.DrawRing(Const Value:Double);

Description

This method draws a ring on the Polar charts with a specified value radius.


DrawValuesForward Method

See also

Applies to

TChartSeries component

Declaration

function DrawValuesForward : Boolean; virtual;

Description

The DrawValuesForward function returns whether the Series needs to draw its points in ascending or descending order.

Some Series need to draw their points in descending order (starting from the last point to the first) depending on certain situations. For example, when the horizontal axis Inverted property is True.


DrawValuesForward method See also
See Also

TChartAxis.Inverted


DrawVerticalLabel Method

Applies to

TChartAxis component

Declaration

procedure DrawVerticalLabel(x,y: Longint; Angle: Integer; Const St: String);

Description

Vertical Axis (LeftAxis and RightAxis) use this method to draw labels and Axis Title. Angle parameter must be an integer value between 0 and 360. X and Y are the text position coordinates. Text will be aligned to Left, Right, Top and / or Bottom depending on the Axis. Angles different than 0, 90, 180 or 270 may need manual XY calculation.


Drawing Text with a rotation Angle.
Drawing Text with a Rotation Angle

Rotation Angle integer number can be 0, 90, 180, 270 or any other valid Angle between 0 and 359.

If you use a custom angle, margins will need to be calculated manually.


EditChart Method

See also

Applies to

TChart

Declaration

procedure EditChart(Form:TForm; Chart: TChart);

Description

This method will call the runtime chart editor. You should use EditDBChart to edit TDBCharts.

You will need to add the EditPro unit (available with TeeChart Pro) to make the Chart Editor available at runtime.

Note

At design time you may call the subject specific page of the Chart Editor directly by double-clicking your chart over the subject. For example a double-click on your Legend will bring up the Chart Editor at the Legend.


EditChart method See also
See also

EditDBChart


EditDBChart Method

See also

Applies to

TDBChart

Declaration

procedure EditDBChart(Form:TForm; Chart: TDBChart);

Description

This method will call the runtime chart editor. You should use EditChart to edit TCharts.

You will need to add the EditPro unit (available with TeeChart Pro) to make the Chart Editor available at runtime.

Note

At design time you may call the subject specific page of the Chart Editor directly by double-clicking your chart over the subject. For example a double-click on your Legend will bring up the Chart Editor at the Legend.


EditDBChart method See also
See also

EditChart


EndColor Property (TChartGradient)

See also

Applies to

TChartGradient component

Declaration

property EndColor : TColor;

Description

Default:  clYellow

The EndColor property is one of the two colors used to create the gradient fill. The gradient fill is composed of two colors: StartColor and EndColor.


EndColor Property (TSurfaceSeries)
EndColor Property

See also	Example

Applies to

TSurfaceSeries component

Declaration

property EndColor : TColor;

Description

Default: clWhite

The EndColor property determines the last Range palette color. When UseColorRange property is True, SurfaceSeries create a color palette using StartColor and EndColor properties.


EndColor property (TChartGradient) See also
See also

TChartGradient.Direction

TChartGradient.StartColor

TChartGradient.Visible


EndColor property (TSurfaceSeries) Example
EndColor Example

This code changes the color range palette:

SurfaceSeries1.UseColorRange := True ;

SurfaceSeries1.StartColor := clWhite ;

SurfaceSeries1.EndColor := clYellow ;


EndColor property (TSurfaceSeries) See also
See Also

TSurfaceSeries.StartColor

TSurfaceSeries.UseColorRange


EndValues Property

See also

Applies to

TGanttSeries component

Declaration

property EndValues : TChartValueList;

Description

The EndValues property defines the ending Gantt bar date value. The starting Gantt bar point is stored at TGanttSeries.StartValues

list property.

StartValues and EndValues can be specified both as DateTime or double values.

Both are standard TChartValueList components. That means you can access their values with same methods as you can access X or Y values.

The TGanttSeries.AddGantt and / or TGanttSeries.AddGanttColor methods must be used to add Gantt bar points.


EndValues property See also
See Also

TGanttSeries.AddGantt

TGanttSeries.AddGanttColor

TGanttSeries.StartValues


EndXValues Example

This code sets to 123 the X1 coordinate of 6th arrow point: (Remember point index starts at zero)

ArrowSeries1.EndXValues.Value[5]:= 123;


EndXValues Property

See also	Example

Applies to

TArrowSeries component

Declaration

property EndXValues : TChartValueList;

Description

Each Arrow has (X0,Y0) and (X1,Y1) coordinates.

EndXValues property is the list of X1 values.


EndXValues See also
See Also

TChartValueList

TArrowSeries.EndYValues

TArrowSeries.StartXValues

TArrowSeries.StartYValues

TArrowSeries.AddArrow


EndYValues Example

This code modifies the Y1 coordinate of first arrow point:

tmp:=ArrowSeries1.EndYValues.Value[0];

ArrowSeries1.EndYValues.Value[0]:=tmp + 123;


EndYValues Property

See also	Example

Applies to

TArrowSeries component

Declaration

property EndYValues : TChartValueList

Description

Each Arrow has (X0,Y0) and (X1,Y1) coordinates.

EndYValues property is the list of Y1 values.


EndYValues See also
See Also

TChartValueList

TArrowSeries.EndXValues

TArrowSeries.StartXValues

TArrowSeries.StartYValues

TArrowSeries.AddArrow


ErrorBar Unit

The ErrorBar unit contains the declarations for the following components and for the enumerated type associated with them. When you add a component declared in this unit to a form, the unit is automatically added to the uses clause of that form's unit. The following items are declared in the this unit:

Components

TErrorBarSeries

Types

TErrorWidthUnits

Routines

To see a listing of items declared in this unit including their declarations, use the ObjectBrower.


ErrorPen Example

This code changes Error Bar's appearance:

ErrorBarSeries1.ErrorPen.Visible := True ;

ErrorBarSeries1.ErrorPen.Width := 2 ;

ErrorBarSeries1.ErrorPen.Color := clRed ;

ErrorBarSeries1.ErrorPen.Style := psSolid ;


ErrorPen Property

See also	Example

Applies to

TErrorBarSeries component

Declaration

property ErrorPen : TChartPen

Description

The ErrorPen property determines what kind of pen will be used for drawing Error "T" on top of Error Bars.


ErrorPen See also
See Also

TChartPen

TBarSeries.BarPen

TErrorBarSeries.ErrorWidth

TErrorBarSeries.ErrorWidthUnits


ErrorValue Example

This code changes the Error value of first Error Bar:

ErrorBarSeries1.ErrorValue[ 0 ] := 34.56 ;


ErrorValue Property

See also	Example

Applies to

TErrorBarSeries component

Declaration

property ErrorValue[ Index : Longint ] : Double;

Description

This property sets or returns the Error value associated to each Bar.

The Error value will be displayed as a "T" on top of each Bar.


ErrorValue See also
See Also

TErrorBarSeries.AddErrorBar

TErrorBarSeries.ErrorValues


ErrorValues Example

This code changes the Error value of first Error Bar:

ErrorBarSeries1.ErrorValues.Value[ 0 ] := 34.56 ;


ErrorValues Property

See also	Example

Applies to

TErrorBarSeries component

Declaration

property ErrorValues : TChartValueList;

Description

The ErrorValues property manages the corresponding Error value for each Bar. The Error value will be displayed as a "T" on top of each Bar.


ErrorValues See also
See Also

TErrorBarSeries.AddErrorBar

TErrorBarSeries.ErrorValue


ErrorWidth Example

This code sets the Error "T" width to 34 pixels:

ErrorBarSeries1.ErrorWidthUnits := ewuPixels;

ErrorBarSeries1.ErrorWidth := 34;


ErrorWidth Property

See also	Example

Applies to

TErrorBarSeries component

Declaration

property ErrorWidth : Integer;

Description

Default 100

The ErrorWidth property determines the horizontal size of the Error "T". Size is expressed either in pixels or in percent of Bar width depending on ErrorWidthUnits property. By default, Error's "T" width is 100% of Bar width.


ErrorWidth See also
See Also

TErrorBarSeries.ErrorPen

TErrorBarSeries.ErrorWidthUnits


ErrorWidthUnits Example

This code sets the Error "T" width to 25 % of Bar width:

ErrorBarSeries1.ErrorWidthUnits := ewuPercent;

ErrorBarSeries1.ErrorWidth := 25;


ErrorWidthUnits Property

See also	Example

Applies to

TErrorBarSeries component

Declaration

property ErrorWidthUnits : TErrorWidthUnits;

Description

Default ewuPercent

The ErrorWidthUnits property determines if ErrorWidth property is expressed either in pixels or in percent of Bar width. By default, Error's "T" width is 100% of Bar width.


ErrorWidthUnits See also
See Also

TErrorBarSeries.ErrorWidth

TErrorBarSeries.ErrorPen


ExactDateTime Property

See also

Applies to

TChartAxis component

Declaration

property ExactDateTime : Boolean;

Description

Default Value: False

The ExactDateTime property controls if TChartAxis.Increment property calculates Axis Labels in exact DateTime steps.

This is very useful when TChartAxis.Increment is a DateTimeStep constant value:

Chart1.BottomAxis.Increment := DateTimeStep[ dtOneMonth ] ;

In this example, the Increment property should be considered to be an exact month. So, if an axis label is:

'1-April-1996'

then the next axis label would be:

'1-May-1996'

and the next:

'1-June-1996'

When ExactDateTime is False (the default value), the dtOneMonth increment equals to 30 days, and axis do not calculate how many days a month has.

The Series XValues or YValues properties should have the DateTime property True. ( XValues for horizontal Axis and YValues for vertical Axis).


ExactDateTime Property See also
See Also

TChartAxis.Increment

TChartSeries.XValues

TChartSeries.YValues

TChartAxis.DateTimeFormat

TChartValueList.DateTime


ExchangeSeries Method

Applies to

TChart, TDBChart components

Declaration

Procedure ExchangeSeries(Series1,Series2 : Longint);

Description

This method changes the Series order, swapping one Series Z position with

another. The Chart repaints to reflect the new Series order.

It accesses TChart.SeriesList property.


FillSampleValues Method

See also

Applies to

TChartSeries component

Declaration

procedure FillSampleValues(NumValues : Longint); virtual;

Description

Each Series draws random values at design mode unless you connect the Series component to other Series component or to a DataSet (Table,SQL,TClientDataset) component.

This method adds some random values to the Series and redraws it.

Example

Series1.FillSampleValues(20);

{will draw a series with 20 values at runtime}


FillSampleValues See also
See Also

NumSampleValues function


First Example

This is the same value as the 0 index value:

LineSeries1.XValues[ 0 ] := 1234.56 ;

ShowMessage( FloatToStr( LineSeries1.XValues.First ) );


First Method

Example

Applies to

TChartValueList component

Declaration

function First : Double;

Description

This function returns the First point value.


FirstPoint Example

In this example FirstPoint is being used with FirstValueIndex / LastValueIndex to refit a fitted curve (CurveFitSeries1) to a zoomed series (LineSeries1).

procedure TForm1.Chart1Zoom(Sender: TObject);

begin

  Begin

    if LineSeries1.FirstValueIndex>0 then

      CurveFitSeries1.FirstPoint:=LineSeries1.FirstValueIndex-1

    else

      CurveFitSeries1.FirstPoint:= LineSeries1.FirstValueIndex;

    CurveFitSeries1.LastPoint:= LineSeries1.LastValueIndex;

  end

  else

  Begin

    CurveFitSeries1.FirstPoint:=-1;

    CurveFitSeries1.LastPoint:=-1;

  end;

  CurveFitSeries1.CheckDataSource; { <-- fill agains the points }

end;


FirstPoint Property

See also	Example

Applies to

TCurveFittingFunction component

Declaration

property FirstPoint : LongInt;

Description

Default Value: -1

With FirstPoint and LastPoint properties you can restrict the subset of points TCurveFittingFunction will use to calculate the polynomy coefficients and it's point values.

By default is -1, meaning all datasource points from the beginning will be used to perform the calculation.

The CurveFittingFunction1.CheckDataSource method must be called after setting FirstPoint and LastPoint properties, forcing TCurveFittingSeries to recalculate again all point values.


FirstPoint property See also
See Also

TCurveFittingSeries.LastPoint

TChartSeries.CheckDataSource


FirstValue Property

See also

Applies to

TChartLegend component

Declaration

property FirstValue : LongInt;

Description

Default Value: 0

The FirstValue property defines the number of the first displayed Legend item. Legend can display all active Series names or all points of a single Series.

FirstValue should be set accordingly, taking care not to overflow the number of active Series or the number of Series points.

You can use FirstValue to show in Legend a specific subset of Series or points.

It should be greater or equal than zero, and lower than number of active Series or Series points.

See TChartLegend.LegendStyle for a description of the different Legend styles.


FirstValue property See also
See Also

TChartLegend.LegendStyle

TChartLegend.Inverted


FirstValueIndex Property

See also

Applies to

TChartSeries component

Declaration

property FirstValueIndex : LongInt;

Description

This function / property returns the ValueIndex of the First point in the Series that has an X value which is between the Horizontal Axis Maximum and Minimum values.

When no Zoom is applied to the Chart, and the Axis are Automatic, the FirstValueIndex is 0. If the Series has no points or there are no visible points, the FirstValueIndex returns -1.


FirstValueIndex See also
See Also

LastValueIndex

FirstPoint


Font Property (TChartAxisTitle)

See also

Applies to

TChartAxisTitle component

Declaration

property Font : TFont;

Description

The Font property determines the kind of font used to draw each Axis Title.

TChartAxis.Title.Caption property should be non empty.

Title text can be rotated using the Angle property.


Font Property (TChartLegend)

See also

Applies to

TChartLegend component

Declaration

property Font : TFont;

Description

The Font property determines the font used to draw all Legend text items. The Legend calculates its dimensions based on Font size and attributes as well as TChartLegend.ColorWidth and TChartLegend.Frame properties settings.


Font Property (TChartShape)

Applies to

TChartTitle component

Declaration

property Font : TFont;

Description

.


Font Property (TSeriesMarks)

See also

Applies to

TSeriesMarks component

Declaration

property Font : TFont;

Description

The Font property determines the font used to draw the Series Marks.

The TSeriesMarks.Visible property must be True.

Series Marks are little text annotations close to each Series point.


Font Property (TSeriesMarks) See also
See Also

TChartSeries.Marks

TSeriesMarks.BackColor

TSeriesMarks.Visible


Font property (TChartAxisTitle) See also
See Also

TChartAxis.Title

TChartAxisTitle.Caption


Font property (TChartLegend) See also
See Also

TChartLegend.Color

TChartLegend.ColorWidth

TChartLegend.Frame

TChartLegend.LegendStyle


FontCanvas Method

See also

Applies to

TChart component

Declaration

procedure FontCanvas(SourceFont : TFont);

Description

The FontCanvas method assigns the SourceFont parameter to the Chart.Canvas.Font property. Internally, FontCanvas adjusts the Font PixelsPerInch property to override the default Delphi behaviour.


FontCanvas See also
See Also

TChart.Canvas

TChart.PrintResolution


Foot Property

See also

Applies to

TChart component

Declaration

property Foot : TChartTitle;

Description

The Foot property defines the Text and formatting properties to be drawn at bottom Chart side. Use the Text property to enter the desired Foot lines, set Visible to True and change the Font, Frame and Brush properties. Use the Alignment property to control text output position.


Foot property See also
See Also

TChart.Title

TChartTitle.Text


FormattedLegend Method

Applies to

TChart, TDBChart components

Declaration

function FormattedLegend (SeriesOrValueIndex : Longint) : String ;

Description

This function returns the text string corresponding to a Legend position.

The Legend position depends on the Legend.LegendStyle property. If LegendStyle is lsSeries, then the text string will be the SeriesOrValueIndexth Active Series Title. If LegendStyle is lsValues, then the text string will be the formatted SeriesOrValueIndexth value of the first Active Series in the Chart.If LegendStyle is lsAuto and only one Active Series exists in the Chart,then the LegendStyle is considered to be lsValues. If there's more than one Active Series then LegendStyle will be lsSeries.

Values are formatted accordingly to the LegendTextStyle property.


FormattedValue Example

This code shows the same text is used to display the Legend 5th item:  (point's index starts at zero)

ShowMessage( Chart1.Legend.FormattedValue( LineSeries1, 4 ) );


FormattedValue Method

See also	Example

Applies to

TChartLegend component

Declaration

function FormattedValue(ASeries : TChartSeries; ValueIndex : Longint) : String;

Description

This function returns the corresponding Legend text for the Series ValueIndex point. The Legend.LegendTextStyle property is used to properly format the point values and labels.


FormattedValue See also
See Also

TChartSeries.ValueFormat

TChartSeries.PercentFormat

TChartSeries.XLabel


FormattedValueLegend Method

See also

Applies to

TChart component

Declaration

function FormattedValueLegend( ASeries: TChartSeries; ValueIndex: Longint): String;

Description

The FormattedValueLegend function returns the string representation of a Series Point value just as it would appear in Chart.Legend.

The ValueIndex parameter is the point index.

The Legend.TextStyle property and all other TChartLegend properties are used to create the resulting string.


FormattedValueLegend method See also
See Also

TChartLegend.TextStyle


Frame (TChart) Example
Frame Example

This code sets the Chart frame:

Chart1.Frame.Visible := True ;

Chart1.Frame.Color := clBlue ;

Chart1.Frame.Width := 1 ;

Chart1.Frame.Style := psDot ;


Frame (TChart) See also
See Also

TChart.ChartRect

TChart.View3D

TChart.BackColor

TChartGradient

TChartWall

TChartTitle.AdjustFrame

TChartTitle

TChartTitle.Brush


Frame Property (TChartLegend)

See also

Applies to

TChartLegend component

Declaration

property Frame : TChartPen;

Description

The Frame property determines the kind of pen used to draw a frame around Legend rectangle.


Frame Property (TChartTitle)
Frame Property

See also	Example

Applies to

TChart and TChartTitle component

Declaration

property Frame : TChartPen

Description

The Frame property indicates the Pen used to draw a frame around the Chart axis. The frame is displayed using the Chart.ChartRect coordinates.


Frame Property (TSeriesMarks)

See also

Applies to

TSeriesMarks component

Declaration

property Frame : TChartPen;

Description

The Frame property determines the kind of pen used to draw a rectangle around a Series Marks.


Frame property (TChartLegend) See also
See Also

TChartLegend.Color


Frame property (TSeriesMarks) See also
See Also

TSeriesMarks.BackColor

TSeriesMarks.Font

TSeriesMarks.Transparent

TSeriesMarks.Visible


FunctionType property Example

To set the period for Function you should use the FunctionType property

To define a functioned series by code you should first create a new series for the function. The series may be of any type.

{ Set the function using the SetFunction method}.

Series1.SetFunction(TAddTeeFunction.Create(Self));

{You may then define the period for the function - here setting it to to 5}

Series1.FunctionType.Period:=5;

To undefine (delete) a function defined for the series use

Series1.SetFunction(nil);


FunctionType Property

See also	Example

Applies to

TChartSeries component

Declaration

property FunctionType : TTeeFunction read FTeeFunction;

Description

The Functiontype property is used with TeeFunction components to define Period and PeriodStyle.


GanttCh Unit

The GanttCh unit contains the declarations for the following components and for the enumerated type associated with them. When you add a component declared in this unit to a form, the unit is automatically added to the uses clause of that form's unit. The following items are declared in the this unit:

Components

TGanttSeries

Types

Routines

To see a listing of items declared in this unit including their declarations, use the ObjectBrower.


GetASeries Method

See also

Applies to

TChart component

Declaration

function GetASeries : TChartSeries;

Description

The GetASeries function returns the FIRST Active Series in a Chart. If Chart has no Series, or none of the Series is Active, this function returns NIL.


GetASeries method See also
See Also

TChart.Series

TChart.SeriesList

TChartSeries.Active


GetAxisSeries Method

Applies to

TChart, TDBChart components

Declaration

function GetAxisSeries ( Axis : TChartAxis ) : TChartSeries ;

Description

This function returns the first Series that depends on the specified Axis. If no Series depend on Axis, the nil value is returned.


GetBarStyle Method

See also

Applies to

TCustomBarSeries component

Declaration

function GetBarStyle(ValueIndex: LongInt) : TBarStyle;

Description

The GetBarStyle function returns the corresponding Bar Style for a given "ValueIndex" Bar.

The ValueIndex parameter must be a valid bar index in the range of zero to Count - 1.

Normally Bar Styles are the same for all Bar points, but you can use the OnGetBarStyle event to supply a different Bar style for each Bar point.

This function calls the OnGetBarStyle if assigned.


GetBarStyle method See also
See Also

TCustomBarSeries.BarStyle

TCustomBarSeries.OnGetBarStyle


GetColorRect Method

Applies to

TChartLegend component

Declaration

function GetColorRect(X1,Y0,Y1:Longint):TRect;

Description

.


GetCursorPos Method

Applies to

TChart, TDBChart components

Declaration

function GetCursorPos:TPoint;

Description


GetCursorValueIndex Example

This code displays the point Label text under the mouse cursor:

procedure TForm1.Chart1MouseDown(Sender: TObject; Button: TMouseButton; Shift: TShiftState; X, Y: Integer);

var

tmp : Longint;

begin

tmp := PieSeries1.GetCursorValueIndex;

if tmp > -1 then

ShowMessage( PieSeries1.XLabel[ tmp ] );

end;


GetCursorValueIndex Method

See also	Example

Applies to

TChartSeries component

Declaration

function GetCursorValueIndex : LongInt;

Description

The GetCursorValueIndex function returns the Series point index which is close to the mouse Screen coordinates. It returns -1 if there's no point close to the mouse cursor position.


GetCursorValueIndex See also
See Also

TChartSeries.Cursor

TChartSeries.Clicked

TChartSeries.GetCursorValues


GetCursorValues Method

See also

Applies to

TChartSeries component

Declaration

procedure GetCursorValues( Var  x , y : Double );

Description

The GetCursorValues method returns the corresponding Series X and Y values where mouse cursor is over. The X and Y values correspond to the Series associated Axis scales. One example of this can be found at teedemo.dpr example project under "Cross-Hair" (ucrossh.pas) unit.


GetCursorValues See also
See Also

TChartSeries.GetCursorValueIndex

TChartSeries.Cursor

TChartSeries.Clicked


GetCurveYValue Method

See also

Applies to

TCurveFittingSeries component

Declaration

function GetCurveYValue(Const X : Double) : Double;

Description

The GetCurveYValue function returns the Y vertical value that corresponds to the X value parameter.

The internal Curve fitting polynomy is used to calculate the Y value.

This function can be called after the Series has been displayed.

The internal polynomy coefficients are calculated just before the Series is drawn.

TCurveFittingFunction draws one point for each of the DataSource Series points.

It internally calls the GetCurveYValue function to calculate the correct Y value that corresponds to each point X coordinate.

X and Y values are expressed in the associated Axis scales.


GetCurveYValue Method See also
See Also

TChartSeries.DataSource

TCurveFittingFunction.PolyDegree

TChartSeries.YValues


GetDefaultPattern Method

See also

Applies to

All TeeChart Components

Declaration

function GetDefaultPattern(PatternIndex : Longint): TBrushStyle;

Description

The GetDefaultPattern function returns a valid Windows Brush Style from an internal palette of 6 possible Brush styles. The PatterIndex parameter is reduced to one of this 6 possible cases.


GetDefaultPattern See also
See Also

TPieSeries.UsePatterns

TChartLegend.PatternColors


GetEditorClass Example

The GetEditorClass function is now a "Class" function and can be called directly without creating any instance:

Var tmp : String;

tmp := TLineSeries.GetEditorClass;

instead of:

With TLineSeries.Create(Self) do

try

  tmp := GetEditorClass;

finally

  Free;

end;


GetEditorClass Method

See also	Example

Applies to

TChartSeries component

Declaration

class function TChartSeries.GetEditorClass : String;

Description

This function returns the class name of the Series Editor Dialog. The default editor dialog classes are:

Series	Editor Class Name	Unit File Name

TChartSeries 	'TChartSeriesEditor' 	SERIEDIT

TCustomSeries 	'TCustomSeriesEditor' 	CUSTEDIT

TCustomBarSeries 	'TBarSeriesEditor' 	BAREDIT

TPieSeries 	'TPieSeriesEditor' 	PIEEDIT

TCandleSeries 	'TCandleEditor' 	CANDLEDI

Warning:

Series Editor Dialogs must be REGISTERED in the initialization Unit Section:

initialization

RegisterClass ( TCustomSeriesEditor ) ;

end.


GetFreeSeriesColor Method

See also

Applies to

TChart component

Declaration

function GetFreeSeriesColor( CheckBackground : Boolean ) : TColor;

Description

The GetFreeSeriesColor function returns a color from the default color palette not used by any Series. The CheckBackGround parameter controls if the returned color should or shouldn't be the Chart BackColor color. This function returns a Color which is not used by any Series in the Chart.


GetFreeSeriesColor See also
See Also

ColorPalette

IsFreeSeriesColor


GetHorizAxis Example

You can use this to change the Axis properties:

LineSeries1.GetHorizAxis.LabelsOnAxis := False ;


GetHorizAxis Method

See also	Example

Applies to

TChartSeries component

Declaration

function GetHorizAxis : TChartAxis;

Description

Every Series is associated either to the Top or Bottom Chart Horizontal Axis. This function returns this "associated" Axis.


GetHorizAxis See also
See Also

GetVertAxis


GetLabelsSeries Method

See also

Applies to

TChart component

Declaration

function GetLabelsSeries(Axis : TChartAxis) : TChartSeries;

Description

The GetLabelsSeries function returns the Series component associated with the Axis parameter.

Each Series is associated with an horizontal and vertical axis through the TChartSeries.HorizAxis and VertAxis properties.

The Axis components call this function to get the correct Series component to draw all Labels.

If no Series exist, or if no Series is associated to the Axis parameter, nil is returned.


GetLabelsSeries method See also
See Also

TChartAxis.LabelStyle

TChartSeries.HorizAxis

TChartSeries.VertAxis


GetMarkValue Method

See also

Applies to

TChartSeries component

Declaration

function GetMarkValue(ValueIndex : LongInt) : Double;

Description

The GetMarkValue function returns the corresponding Point value suitable for displaying at Series Marks. Most Series return the YValue[ ValueIndex ] value, but some special Series like THorizBarSeries return the XValue as Axis are inverted. Calling this virtual method assures receiving the proper value.


GetMarkValue See also
See Also

TChartSeries.ValueMarkText

TChartSeries.XValue

TChartSeries.YValue

TChartSeries.Marks


GetOriginPos Method (TAreaSeries)
GetOriginPos Method

See also

Applies to

TAreaSeries component

Declaration

function GetOriginPos(ValueIndex : LongInt) : Longint;

Description

The GetOriginPos function returns the vertical point coordinate in Screen pixels for a given Area point origin value. The MultiBar property determines if origin is the Chart.ChartRect.Bottom coordinate or if it's the PointOrigin for Stacked and Stacked 100% styles.


GetOriginPos Method (THorizBarSeries)
GetOriginPos Method

See also

Applies to

TBarSeries and THorizBarSeries component

Declaration

function GetOriginPos(ValueIndex : Longint) : Longint;

Description

The GetOriginPos function returns the corresponding screen pixels coordinate of the leftmost horizontal bar edge.

When MultiBar property is different than Stacked or Stacked 100%, this function returns the YOrigin screen coordinate.

When several bar Series are stacked, this function returns a different screen coordinate for each Series.

The ValueIndex parameter specifies the bar index.


GetOriginPos method (TAreaSeries) See also
See Also

TAreaSeries.MultiArea

TChartSeries.PointOrigin


GetOriginPos method (THorizBarSeries) See also
See Also

TCustomBarSeries.MultiBar

TCustomBarSeries.YOrigin

TCustomBarSeries.UseYOrigin


GetRectangle Method

Applies to

TChart, TDBChart components

Declaration

function GetRectangle:TRect; virtual;

Description


GetSurfacePaletteColor Example

Form1.Canvas.Pen.Color := SurfaceSeries1.GetSurfacePaletteColor( 1234.56 );


GetShapeRect Method

Applies to

TChartShape component

Declaration

function GetShapeRect : TRect;

Description


GetSurfacePaletteColor Method

See also	Example

Applies to

TSurfaceSeries component

Declaration

function GetSurfacePaletteColor(Const Y : Double) : TColor;

Description

The GetSurfacePaletteColor function returns the color that corresponds to a given Y value. The Palette is used to lookup the color intervals. This function can be use to draw Surface color legends.


GetSurfacePaletteColor See also
See Also

TSurfaceSeries.AddPalette

TSurfaceSeries.Palette

TSurfaceSeries.UsePalette

TSurfaceSeries.UseColorRange


GetVertAxis Method

See also

Applies to

TChartSeries component

Declaration

function GetVertAxis:TChartAxis;

Description

Every Series is associated either to the Left or Right Chart Vertical Axis. This function returns this "associated" Axis. You can use this to change the Axis properties:

BarSeries1.GetVertAxis.AxisValuesFormat := '#,##0.0#' ;


GetVertAxis See also
See Also

GetHorizAxis


GetWidthHeight Method

Applies to

TChart, TDBChart components

Declaration

Procedure GetWidthHeight(Var tmpWidth,tmpHeight:Longint);

Description


GetXZValue Method

See also

Applies to

TSurfaceSeries component

Declaration

function GetXZValue(X,Z : Longint) : Double;

Description

The GetXZValue function returns the corresponding Y value for a given X and Z coordinates. It calls the OnGetYValue event and returns the calculated value. It returns zero if OnGetYValue is not assigned.


GetXZValue See also
See Also

TSurfaceSeries.OnGetYValue

TSurfaceSeries.AddXYZ


GetYValueList Method

Applies to

TChartSeries component

Declaration

function GetYValueList(AListName:String):TChartValueList; virtual;

Description

All Series types have at least the XValues and YValues ValueLists. Some Series have more ValueLists. For example, CandleSeries have the "Close", "High" and "Low" valuelists. You can access these ValueLists by name using the above function:

tmp := CandleSeries1.GetYValueList( 'HIGH' ).MaxValue ;

This can be useful if you're doing generic functions.


Gradient Property

See also

Applies to

TChart component

Declaration

property Gradient : TChartGradient;

Description

The Gradient property specifies the colors used to fill Chart background. Chart background is filled using these two colors: StartColor and EndColor. You can control the drawing output by setting the TChartGradient.Direction property. Use the Visible property to show / hide filling.


Gradient property See also
See Also

TChart.BackColor

TChart.Color

TChart.BackImage

TChartGradient.Direction


GradientFill Example

This code fills a Form background:

procedure TForm1.Button1Click(Sender: TObject);

begin

GradientFill( Canvas, ClientRect, clYellow, clBlue, True);

end;


GradientFill Method

See also	Example

Applies to

Global

Declaration

procedure GradientFill(Canvas: TCanvas; Const Rect: TRect; top, bottom: TColor; Horizontal: Boolean);

Description

The GradientFill method is used to fill a Screen area with multi-colored lines to obtain a nice shadow effect and coloured backgrounds. The Chart.Gradient component uses this method internally. Chart.pas must bi in your uses clause.


GradientFill See also
See Also

TChart.Gradient


GreenFactor Example

This changes the default Surface color palette:

SurfaceSeries1.GreenFactor := 0.65 ;

SurfaceSeries1.CreateDefaultPalette( SurfaceSeries1.PaletteSteps );


GreenFactor Property

See also	Example

Applies to

TSurfaceSeries component

Declaration

property GreenFactor : Double

Description

Default 1

When UsePalette property is True, Surface Series create a default color palette. The GreenFactor property indicates the proportion of Green color used to create the default palette. This property can only be accessed at run-time. Click here to see the formula used to create the palette.


GreenFactor See also
See Also

TSurfaceSeries.UsePalette

TSurfaceSeries.BlueFactor

TSurfaceSeries.RedFactor


Grid Property

See also

Applies to

TChartAxis component

Declaration

property Grid : TChartPen;

Description

The Grid property determines the kind of pen used to draw the Axis lines at every Axis Label position. These are the lines which go from "cousin Axis" Minimum to "cousin Axis" Maximum screen positions at each of our Label's position.


Grid property See also
See Also

TChartAxis.Axis

TChartAxis.LabelsFont

TChartAxis.MinorTicks

TChartAxis.OnGetAxisLabel

TChartAxis.Ticks

TChartAxis.TicksInner


GridPen Property

See also

Applies to

TChartAxis component

Declaration

property GridPen : TChartPen

Description

The GridPen axis property indicates the kind of pen used to draw axis Grid lines. Left and Right axis draw horizontal grid lines, while Top and Bottom axis draw vertical grid lines.

Warning:

Set GridPen.Width := 0 when printing with non solid Pen Styles.


GridPen property See also
See Also

TChartAxis.Ticks

TChartAxis


Height3D Example

This code draws a vertical "frame":

With Chart1,Canvas do

begin

MoveTo( ChartRect.Left + 10 , ChartRect.Bottom ) ;

LineTo( ChartRect.Left + 10 , ChartRect.Top ) ;

LineTo( ChartRect.Left + 10 + Width3D  , ChartRect.Top - Height3D ) ;

end;


Height3D Property

See also	Example

Applies to

TChart component

Declaration

property Height3D : Longint

Description

Run-time and read only. The Height3D property determines the height in pixels of the 3D effect. The Chart.View3D property should be True. It equals zero if Chart.View3D is False.


Height3D See also
TChart.SeriesHeight3D

TChart.SeriesWidth3D

TChart.Width3D


Help file credits

About...	TeeChart Pro Order

This help file was written and compiled by:

TeeMach SL and McDermott Enterprises (e-mail: mattmcd@lightspeed.net).


HighValues Property

See also	Example

Applies to

TOHLCSeries component

Declaration

property HighValues : TChartValueList;

Description

The HighValues property is used to store all Stock market High values. You can access High values in the same way you can access X or Y values.


HighValues property Example

Example:

{ this code decreases the last Candle High value }

With CandleSeries1 do

begin

HighValues[ Count ] := HighValues[ Count ] - 1 ;

Repaint;

end;


HighValues property See also
See Also

TOHLCSeries.CloseValues

TOHLCSeries.DateValues

TOHLCSeries.LowValues

TOHLCSeries.OpenValues


HorizAxis Example

You can change the desired Horizontal Axis both at design and runtime:

BubbleSeries1.HorizAxis := aTopAxis ;


HorizAxis Property

See also	Example

Applies to

TChartSeries component

Declaration

property HorizAxis : THorizAxis;

Description

The HorizAxis property is of type: THorizAxis. It means by which Horizontal Axis ( Top or Bottom axis ) will be the Series horizontally scaled.


HorizAxis See also
See Also

TChartSeries.VertAxis


HorizMargin Property

See also

Applies to

TChartLegend component

Declaration

property HorizMargin : Integer;

Description

Default Value: 0

The HorizMargin property speficies the number of screen pixels between Legend and Chart rectangles. By default its 0, meaning Legend will calculate a predefined margin based on total Legend width.

It's only used when Legend position is Left or Right aligned.


HorizMargin property See also
See Also

TChartLegend.VertMargin

TChart.MarginLeft

TChart.MarginRight


HorizSize Property (TSeriesPointer)
HorizSize Property

See also

Applies to

TSeriesPointer component

Declaration

property HorizSize : Integer;

Description

Default Value: 4

The HorizSize property specifies the Series Pointer width in logical pixels.

Series that derive from TPointSeries usually override the HorizSize and VertSize properties.

For example, TBubbleSeries uses the Radius property to determine the correct HorizSize and VertSize, so these properties have no effect in that Series.


HorizSize property (TSeriesPointer) See also
See Also

TSeriesPointer

TSeriesPointer.VertSize


Horizontal Property

See also

Applies to

TChartAxis component

Declaration

property Horizontal : Boolean;

Description

Run-time and read only. This property returns true if the Axis is horizontal. Chart.TopAxis and Chart.BottomAxis are horizontal. Chart.LeftAxis and Chart.RightAxis are vertical.

Chart Axis	Horizontal	OtherSide

================================

LeftAxis	False	False

TopAxis	True	True

RightAxis	False	True

BottomAxis	True	False

=================================


Horizontal See also
See Also

Axis.OtherSide function


How to create charts with manually inserted values

Data Aware Charts

If values are manually inserted it means that you do not want TeeChart to automatically retrieve the Series points from a Table or Query.

1) Place a TChart component in a Delphi Form.

2) Place a Series component in the same Form. (For example, you can choose a BarSeries component.)

3) Set the Series.ParentChart property to Chart1. The TChart will display some random points.

4) In your Form1.OnCreate event (or in a Button1.OnClick event), type the following code:

BarSeries1.Clear;

BarSeries1.AddY( 25 , 'Barcelona'     , clTeeColor );

BarSeries1.AddY( 50 , 'Rome'          , clTeeColor );

BarSeries1.AddY( 30 , 'San Francisco' , clTeeColor );

BarSeries1.AddY( 50 , 'New York'      , clTeeColor );

BarSeries1.AddY( 40 , 'Los Angeles'   , clTeeColor );

BarSeries1.AddY( 35 , 'London'        , clTeeColor );

That's it.

Now lets add a new Line Series component:

5) Place a Line Series component in the Form.

6) Add the following code to the previous code:

LineSeries1.Clear;

LineSeries1.AddY( 25 , '' , clTeeColor );

LineSeries1.AddY( 50 , '' , clTeeColor );

LineSeries1.AddY( 30 , '' , clTeeColor );

LineSeries1.AddY( 50 , '' , clTeeColor );

LineSeries1.AddY( 40 , '' , clTeeColor );

LineSeries1.AddY( 35 , '' , clTeeColor );

(Notice you do not need to insert the Horizontal Labels again).

clTeeColor is a TeeChart color constant that means "draw the point in the default color". You can assign a specific color (clRed, clBlue, etc) to each point or you can set the LineSeries1.ColorEachPoint property to True in order to automatically draw each point with a different color.

If you have X (Horizontal) Coordinates:

Replace the AddY method with AddXY:

LineSeries1.AddXY( 15.2 , 25.4 , 'Barcelona' , clBlue );

Other Chart Series types:

Other Series types have specific methods to add points:

PieSeries1.AddPie( 333 , 'Sales' , clTeeColor );

BubbleSeries1.AddBubble( 15.2 , 25.4 , 13 , '' , clRed ); {being 13 the bubble radius}

Deleting points:

Use the Series Delete method:

{This will delete the 5# point from LineSeries1}

LineSeries1.Delete( 5 );

Modifying points:

Use the Series XValue, YValue properties:

LineSeries1.YValue[3] := 27.1 ;

{In Bubble Series}

BubbleSeries1.RadiusValues.Value[ 8 ] := 8.1 ;

{In Pie Series}

PieSeries1.PieValues.Value[ 3 ] := 111 ;

Please refer to each specific Series type to see its specific data related methods.

DateTime point coordinates:

TeeChart Series accept DateTime values.

{First, you need to set the DateTime property to True in the desired X and/or Y values list.}

LineSeries1.XValues.DateTime := True ;

{Second, use the same above described methods, but give the values as Date, Time or DateTime values}

LineSeries1.AddXY( EncodeDate( 1996 , 1 , 23 ) , 25.4 , 'Barcelona' , clGreen );


How to Create Data Aware Charts
How to Create Data-Aware Charts

Manual Charts

The only difference between TChart and TDBChart is TChart does not need the Borland Database Engine.

However, points must be manually added by programming.

TDBChart, in contrast, accepts Series connected to database components (like TTable, TQuery or TClientDataset).

TDBChart will retrieve database records and will automatically add the points.

Add a data table to your form

1) Place a TTable component and assign to it an existing Table. It is not necessary to make the table Active at this stage.

Steps to create a simple data-aware chart

(You can do all steps without programming, using the Chart editor)

2) Place a TDBChart in your form.

3) Right mouse key on the Chart to call up the TeeChart menu then select the Chart editor menu option or Double-click on the chart to go straight to the Chart editor.

4) In the Chart editor add a Series to the Chart by clicking on the Add button. This will call the TeeChart Gallery.Select a series type and click OK.

5) Back in the Chart editor select the Series page with the tab selector (or double-click on your series in the editor series list)

6) On the series page select your new series in the Series Combobox (If you only have one series in the chart it will automatically be displayed in the combobox). Click on the datasource tab to add the new datasource.

7) Select Dataset from the dropdown combobox to define the DataSource property.

Now you can set the series data sources:

8) Set the Dataset field to Table1.

9) Now you need to set Table Fields that will be used to draw your data series: Set the Labels field to the desired table Field. (for example: Table1.CityName) Set the Y values to the desired Vertical Table Field. (for example: Table1.Population). The fields available in this tab page of the Chart editor will depend on the series you are adding. For example a LineSeries will a permit the use of X and Y co-ordinates and an optional Label field, a Pie-series only uses the label field and one set of values. See the Series unit for more information.

Activate your data

10) Now set Active to True (or Open) the Table. Opening or closing the Table will force TDBChart to retrieve the records again, thus allowing refresh.

Color in fields:

It is also possible to have the point colors in a Table or Query field. The field must be a Numeric field containing RGB (Red,Gree,Blue) values.Assign the LineSeries1.ColorSource property to this field.

Colors are expressed as numbers, please refer to the Delphi and Windows help to know more about RGB colors. (TColorType)


How to zoom See also
See Also

Chart Zooming

Restoring Zoom and Scroll


Increment Example

Chart1.BottomAxis.Increment := DateTimeStep[ dtOneHour ] ;

Chart1.RightAxis.Increment  := 1000 ;


Increment Property

See also	Example

Applies to

TChartAxis component

Declaration

property Increment : Double;

Description

Axis Increment is the minimum step between axis labels. It must be a positive number or DateTime value. TChart will use this value as the starting axis labels step. If there is not enough space for all labels, TChart will calculate a bigger one. You can use the DateTimeStep constant array for DateTime increments.


Increment See also
See Also

Axis Maximum

Axis Minimum


InflateMargins Property

See also

Applies to

TSeriesPointer component

Declaration

property InflateMargins : Boolean

Description

The InflateMargins property controls if Chart dimensions will be rescaled to accomodate the Series.Pointer HorizSize and VertSize pixels. When False, Chart Axis scales will be preserved and points close to the Axis limits will be partially displayed.


InflateMargins See also
See Also

TSeriesPointer.HorizSize

TSeriesPointer.VertSize


InsertChartValue Method

See also

Applies to

TChartValueList component

Declaration

procedure InsertChartValue(ValueIndex: Longint; Const Value: TChartValue);

Description

This method is used internally to insert values to individual Chart lists at specific positions. The Series AddY and AddXY method call this method for Y Chart Value Lists.


InsertChartValue See also
See Also

TChartValueList.AddChartValue

TChartSeries.AddY


Inverted Property (TChartAxis)
Inverted Property

See also

Applies to

TChartAxis component

Declaration

property Inverted : Boolean;

Description

Default False

When Inverted is True, Axis Minimum and Maximum scales will be swapped. Axis labels and Series points will be displayed accordingly. This applies both to vertical and horizontal axis.


Inverted Property (TChartLegend)

See also

Applies to

TChartLegend component

Declaration

property Inverted : Boolean;

Description

Default False

The Inverted property indicates, when True, to draw the Legend items in opposite direction. Legend strings are displayed starting at top for Left and Right Aligment and starting at left for Top and Bottom Legend orientations. You can use the Legend.FirstValue property to determine the ValueIndex for the first Legend text item.


Inverted property (TChartAxis) See also
See Also

TChartAxis.Maximum

TChartAxis.Minimum


Inverted property (TChartLegend) See also
See Also

TChartLegend.Alignment

TChartLegend.FirstValue


IsDateTime Example

if Chart1.BottomAxis.IsDateTime then...


IsDateTime Method

Example

Applies to

TChartAxis component

Declaration

function IsDateTime : Boolean;

Description

Each Chart Axis can consider values to be normal numbers or DateTime values. This function returns if the Axis dependent values are DateTime or not.


IsFreeSeriesColor Example

This code sets the MySeries1.SeriesColor to the clBlue color only if clBlue is not used by any other Series or the Chart BackColor:

if Chart1.IsFreeSeriesColor ( clBlue , True ) then

    MySeries1.SeriesColor := clBlue ;

IsFreeSeriesColor returns if AColor is NOT used by any Chart.Series.

If Chart1.IsFreeSeriesColor( clRed ) then

LineSeries1.SeriesColor := clRed ;


IsFreeSeriesColor Method

See also	Example

Applies to

TChart component

Declaration

function IsFreeSeriesColor(AColor: TColor; CheckBackground: Boolean) : Boolean;

Description

The IsFreeSeriesColor returns whether the AColor parameter is used by any Series or not. The CheckBackGround parameter controls if AColor will be checked against the Chart.BackColor or not.


IsFreeSeriesColor See also
See Also

ColorPalette

GetFreeSeriesColor


IsScreenHighColor Example

This code shows or hides the Chart.Gradient:

Chart1.Gradient.Visible := Chart1.IsScreenHighColor ;


IsScreenHighColor Method

See also	Example

Applies to

TChart component

Declaration

function IsScreenHighColor : Boolean;

Description

The IsScreenHighColor function returns True if the current video mode color depth is greater than 256 colors.


IsScreenHighColor Method See also
See Also

WarningHighColor


IsValidDataSource Method

See also

Applies to

TChart component

Declaration

function IsValidDataSource(ASeries: TChartSeries; AComponent: TComponent): Boolean; virtual;

Description

The IsValidDataSource function determines if the AComponent parameter is a valid component to provide the point values for the ASeries component.

The TChart component accepts TChartSeries components as valid DataSources. The TDBChart component accepts TChartSeries and any TDataSet (TTable, TQuery, TClientDataset, etc) components as valid DataSources.

This function is used at design-time and run-time to control Series have valid point values sources.


IsValidDataSource method See also
See Also

TChartSeries.DataSource


IsValidSeriesSource Method

Applies to

TChartSeries component

Declaration

function IsValidSeriesSource(Value : TChartSeries): Boolean; virtual;

Description

The IsValidSeriesSource function checks if the Value series parameter is a valid candidate series point provider.

When TChartSeries.DataSource property is assigned to another Series, all points inserted in that Series are automatically propagated to all other associated Series.

This function is currently used only in TRSIFunction component. This special Series type allows only one specific Series type as DataSource: a TOHLCSeries or TCandleSeries.

All other Series components will return True.


IsValidSourceOf Method

Applies to

TChartSeries component

Declaration

function IsValidSourceOf(Value: TChartSeries): Boolean; virtual;

Description

The IsValidSourceOf function returns False if the Value parameter is the same as Self.

It's used to validate the DataSource property both at design and run-time.


LabelHeight Method

See also

Applies to

TChartAxis component

Declaration

function LabelHeight(Const Value: Double): LongInt;

Description

This function returns the Axis Label height of the Value parameter. It uses the Axis formatting specifiers, the Axis Labels Font and the Labels rotation and style.


LabelHeight See also
See Also

LabelWidth


LabelStyle Property

See also

Applies to

TChartAxis component

Declaration

property LabelStyle: TAxisLabelStyle;

Description

Setting the Axis.LabelStyle property to talAuto will force the Axis to guess what labels will be drawn.

For each Active associated Series, if the Series have XLabels then the LabelStyle will be talText.

If no Series have XLabels, then LabelStyle will be talValue.

If no Active Series are associated with the Axis, the LabelStyle will be talNone.


LabelStyle See also
See Also

Chart.OnGetAxisLabel event


LabelValue Method

See also

Applies to

TChartAxis component

Declaration

function LabelValue(Const Value: Double): String;

Description

This function returns the corresponding text representation of the Value parameter. It uses the Axis formatting specifiers.


LabelValue See also
See Also

LabelHeight

LabelWidth


LabelWidth Method

See also

Applies to

TChartAxis component

Declaration

function LabelWidth(Const Value : Double) : Longint;

Description

This function returns the Axis Label width of the Value parameter. It uses the Axis formatting specifiers, the Axis Labels Font and the Labels rotation and style.


LabelWidth See also
See Also

LabelHeight


Labels Property

See also

Applies to

TChartAxis component

Declaration

property Labels : Boolean;

Description

Default Value: True

The Labels property shows or hide Axis Labels. Set it to False to draw the Axis Ticks and / or Grid lines only.

Use the LabelsAngle and LabelStyle properties to control Label appearing.

Use the Visible property to show or hide both the Axis Labels, Ticks and Grid lines.


Labels property See also
See Also

TChartAxis.Grid

TChartAxis.LabelsAngle

TChartAxis.LabelsFont

TChartAxis.LabelStyle

TChartAxis.OnGetAxisLabel

TChartAxis.Ticks

TChartAxis.Visible


LabelsAngle Property

See also

Applies to

TChartAxis component

Declaration

property LabelsAngle : Integer;

Description

Default Value: 0

The LabelsAngle property defines the rotation degree applied to each Axis Label. Valid degree angle values are 0, 90, 180, 270 and 360. Some printers and video drivers fail when drawing rotated fonts or calculating the rotated font dimensions. Metafile Charts containing rotated fonts sometimes place text at sligthly different coordinates.


LabelsAngle property See also
See Also

TChartAxis.Grid

TChartAxis.Labels

TChartAxis.LabelsFont

TChartAxis.LabelStyle

TChartAxis.OnGetAxisLabel

TChartAxis.Ticks

TChartAxis.Visible


LabelsFont Property

See also

Applies to

TChartAxis component

Declaration

property LabelsFont : TFont;

Description

The LabelsFont property determines the Font used to draw Axis Labels. The default Font is Arial. TrueType fonts look much better and perform more exactly. The LabelsFont.Size determines the number of non-overlapping axis labels.


LabelsFont property See also
See Also

TChartAxis.Labels

TChartAxis.LabelsAngle

TChartAxis.LabelStyle

TChartAxis.Grid

TChartAxis.OnGetAxisLabel

TChartAxis.Ticks

TChartAxis.Visible


LabelsOnAxis Property

See also

Applies to

TChartAxis component

Declaration

property LabelsOnAxis : Boolean;

Description

Default Value: True

The LabelsOnAxis property controls if Labels just at Axis Minimum and Maximum positions will be shown or NOT.

Set it to False, for example, to remove the "0" zero axis Label when Axis scales are from 0 to 1001:

Chart1.LeftAxis.SetMinMax( 0, 1001 );

Chart1.LeftAxis.LabelsOnAxis := False;

When Chart.View3D is True, Axis scales can vary to adapt Series minimum and maximum points dimensions.


LabelsOnAxis property See also
See Also

TChartAxis.Labels

TChartAxis.LabelsFont

TChartAxis.LabelStyle

TChartAxis.LabelsAngle

TChartAxis.OnGetAxisLabel


LabelsSeparation Property

See also

Applies to

TChartAxis component

Declaration

property LabelsSeparation : Integer;

Description

Default Value: 10

The LabelsSeparation property specifies the percent amount of minimum distance between Axis Labels.

Setting it to "0" zero makes TChartAxis skip calculating overlapping labels. (No clipping is performed).

Labels visibility depends also on LabelsFont size, LabelsAngle and Axis.Increment properties.


LabelsSeparation property See also
See Also

TChartAxis.Labels

TChartAxis.LabelsFont

TChartAxis.LabelStyle

TChartAxis.LabelsAngle

TChartAxis.OnGetAxisLabel


LabelsSize Example

You can set this property both at design or runtime:

Chart1.RightAxis.LabelsSize := 50 ; (50 pixels separation)


LabelsSize Property

Example

Applies to

TChartAxis component

Declaration

property LabelsSize : Integer;

Description

The LabelsSize property is 0 by default.

Therefore the space between the Axis and the Chart will be automatically calculated based on the Axis Labels Width and Height.


Last Example

This is the same value as the Count - 1 index value:

LineSeries1.YValues[ LineSeries1.YValues.Count - 1 ] := 1234.56 ;

ShowMessage( FloatToStr( LineSeries1.YValues.Last ) );


Last Method

Example

Applies to

TChartValueList component

Declaration

function Last : Double;

Description

This function returns the Last point value. This is the same value as the Count - 1 index value:


LastPoint Property

See also

Applies to

TCurveFittingFunction component

Declaration

property LastPoint : LongInt;

Description

Default Value: -1

With FirstPoint and LastPoint properties you can restrict the subset of points TCurveFittingFunction will use to calculate the polynomy coefficients and it's point values.

By default is -1, meaning all datasource points up to the last one will be used to perform the calculation.

The TCurveFittingFunction1.CheckDataSource method must be called after setting FirstPoint and LastPoint properties, forcing TCurveFittingFunction to recalculate again all point values.


LastPoint property See also
See Also

TCurveFittingFunction.FirstPoint

TChartSeries.CheckDataSource


LastValueIndex Property

See also

Applies to

TChartSeries component

Declaration

property LastValueIndex : Longint;

Description

This property returns the ValueIndex of the Last point in the Series that has an X value which is between the Horizontal Axis Maximum and Minimum values.

When no Zoom is applied to the Chart, and the Axis are Automatic, the LastValueIndex is the same as TChartSeries.Count-1.

If the Series has no points or there are no visible points, the LastValueIndex returns -1.


LastValueIndex See also
See Also

FirstValueIndex

FirstPoint


LeftAxis Property

See also

Applies to

TChart component

Declaration

property LeftAxis : TChartAxis;

Description

The LeftAxis property determines the Labels and formatting attributes of Left Chart side. It also controls where Series points will be placed.

Every TChart component has four TChartAxis: Left, Top, Right and Bottom.

The LeftAxis is pre-defined to be:

Horizontal := False ;

OtherSide  := False ;

Refer to TChartAxis help topic for a complete description.


LeftAxis property See also
See Also

TChartAxis

TChart.TopAxis

TChart.RightAxis

TChart.BottomAxis

TChart


LeftWall Property

See also

Applies to

TChart component

Declaration

property LeftWall : TChartWall;

Description

The LeftWall property determines the drawing attributes of Chart Left side. Chart.View3D and Chart.View3DWalls properties must be

set to TRUE for LeftWall to be shown.

You can use the Color, Size, Pen and Brush TChartWall's properties to control the wall appearance.

A Chart component has also a BottomWall and BackColor properties.


LeftWall property See also
See Also

TChartWall

TChart.BackColor

TChart.BottomWall


Legend Property

See also

Applies to

TChart component

Declaration

property Legend : TChartLegend;

Description

The Legend property determines the text and drawing attributes of Chart's textual representation of Series and Series values.

The TChartLegend component draws a rectangle and for each Series in a Chart (or for each point in a Series) outputs a text representation of that Series (or that point).

You can use the Legend.LegendStyle and Legend.TextStyle properties to control the text used to draw the legend.

The Legend can be positioned at Left, Right, Top and Bottom chart sides using the Legend.Alignment property.

Use the Legend.Visible property to show / hide the Legend.

The Inverted property makes Legend to draw text starting from bottom.

The Frame, Font and Color properties allow you to change Legend appearance.

The Legend.ColorWidth property determines the percent width of each item's "colored" mark.

The Legend.FirstValue property controls which Series (or Series point) will be used to draw first Legend item.


Legend property See also
See Also

TChart

TChartLegend


LegendStyle Property

See also

Applies to

TChartLegend component

Declaration

property LegendStyle : TLegendStyle;

Description

Default Value: lsAuto

The LegendStyle property defines which items will be displayed in Chart Legend.

lsSeries style shows the TChartSeries.Title of all active Series in a Chart. Whenever a Series Title is empty, the Series Name property is used.

lsValues style shows a text representation of all points of the first active Series in a Chart.

lsLastValues style shows the last point value and the TChartSeries.Title of all active Series in a Chart.  It is useful for real-time charting, where new points are being added at the end of each Series.

lsAuto style (the default) means LegendStyle will be lsSeries when there's more than one Active Series, and lsValues when there's only one Series in a Chart.

The TChartLegend.TextStyle property determines how the Series point values are formatted.


LegendStyle property See also
See Also

TChartLegend.TextStyle

TChartSeries.Active


LineBrush Property

See also

Applies to

TLineSeries component

Declaration

property LineBrush : TBrushStyle;

Description

Default Value: bsSolid

The LineBrush property defines the brush style used to fill LineSeries contents.

It has effect only when Chart1.View3D is True.

The Legend reflects automatically the selected brush style.

Setting different brush styles can be useful when printing on monochrome printers.


LineBrush property See also
See Also

TLineBrush.LinePen


LinePen Example

This code changes FastLineSeries's pen style:

FastLineSeries1.LinePen.Style := psDot;


LinePen Property

See also	Example

Applies to

TAreaSeries and TFastLineSeries component

Declaration

property LinePen : TChartPen

Description

The LinePen property determines what kind of pen will be used for drawing the line connecting all points.


LinePen See also
See Also

TChartPen


LinkedSeries Property

Applies to

TChartSeries component

Declaration

property LinkedSeries : TList read FLinkedSeries;

Description

.


Locate Method

Applies to

TChartValueList component

Declaration

function Locate (Const Value:Double):Longint;

Description

This new function returns the corresponding point index which has the specified Value. You can use it to calculate X co-ordinates based on Y values or vice-versa:

tmp:=LineSeries1.XValues.Locate(EncodeDate(1996,1,1));

if tmp<>-1 then

ShowMessage(FloatToStr(LineSeries1.YValues.Valuetmp));


Logarithmic Property

Applies to

TChartAxis component

Declaration

property Logarithmic : Boolean;

Description

This boolean property scales the Axis Logarithmically when True. Axis Minimum and Maximum values should be greater than 0, and Axis cannot be of DateTime type.


LowValues Property

See also	Example

Applies to

TOHLCSeries component

Declaration

property LowValues : TChartValueList;

Description

The LowValues property is used to store all Stock market Low values. You can access Low values in the same way you can access X or Y values.


LowValues property Example

{ this code makes all Candle Low values the same as Close values }

With CandleSeries1 do

begin

for t:= 0 to Count - 1 do LowValues[ t ]:= CloseValues[ t ];

Repaint;

end;


LowValues property See also
See Also

TOHLCSeries.CloseValues

TOHLCSeries.DateValues

TOHLCSeries.HighValues

TOHLCSeries.OpenValues


MandatoryValueList Example

This code shows the most important value for a Series 5th point:

(remember points start at zero)

ShowMessage( FloatToStr( LineSeries1.MandatoryValueList.Value[ 4 ] ) );


MandatoryValueList Method

See also	Example

Applies to

TChartSeries component

Declaration

function MandatoryValueList : TChartValueList;

Description

The MandatoryValueList function returns the Series ValueList that stores the most important Series values. Most Series types return the YValues list, but some return the XValues list (THorizBarSeries, for example).


MandatoryValueList See also
See Also

TChartSeries.ValueList

TChartValueList


Margin Properties

Example

Applies to

TChart, TDBChart components

Declaration

property MarginLeft : Integer;

property MarginTop : Integer;

property MarginRight : Integer;

property MarginBottom : Integer;

Description

Each Chart component has four margin properties: LeftMargin, RightMargin, TopMargin, BottomMargin.

These properties are expressed in screen pixels. Default values are 8 for top and bottom margins and 12 for left and right margins.


Margins Example

You can change both at design and runtime the margins properties:

Chart1.LeftMargin := 60 ;


MarkPercent Example

This will show the 0 Point Y Value in percent format: 12.23%

ShowMessage( LineSeries1.MarkPercent( 0, False ) );

This adds the total to the end of the string: 12.23% of 55400

ShowMessage( LineSeries1.MarkPercent( 0, True ) );

This function uses the PercentFormat formatting string property. When AddTotal is TRUE, then the global string variable PercentOf is used to separate the percent text from the total text. By default, PercentOf string is: " of ".

You can change it to the desired text:

PercentOf := ' from ' ;

This string constant is 32 char length.


MarkPercent Method

Example

Applies to

TChartSeries component

Declaration

function MarkPercent(ValueIndex: Longint; AddTotal: Boolean): String;

Description

This function returns a textual representation of a Point Value. Series components use this function internally to paint Marks in percent format. This function uses the PercentFormat formatting string property. When AddTotal is TRUE, then the global string variable PercentOf is used to separate the percent text from the total text. By default, PercentOf string is: " of ".


MarkText Method

Applies to

TChart, TDBChart components

Declaration

function MarkText ( ASeries : TChartSeries ; ValueIndex : Longint ) : String ;

Description

This function returns the formatted Series.Mark text of the ValueIndexth Series point.


Marks Property

See also

Applies to

TChartSeries component

Declaration

property Marks : TSeriesMarks;

Description

The Marks Series subcomponent defines all necessary properties to draw a mark near to each Series point.

A mark consist of a colored rectangle with a text string on it and a line that indicates which points corresponds to which mark.

You can control all Marks formatting attributes and styles. The TChartSeries.OnGetMarkText event can be used to override the default Marks text strings or to hide specific point Marks.

Each different Series type draws it's marks differently.


Marks property See also
See Also

TChartSeries.OnGetMarkText


MaxLabelsWidth Method

See also

Applies to

TChartAxis component

Declaration

function MaxLabelsWidth : Longint;

Description

This function returns the maximum width in Screen pixels of all Axis Labels.

It is internally used to calculate the Axis Increment in order to prevent overlapped Axis Labels.


MaxLabelsWidth See also
See Also

LabelWidth

LabelHeight


MaxLegendWidth Method

See also

Applies to

TChartLegend component

Declaration

function MaxLegendWidth(NumLegendValues: LongInt): LongInt;

Description

The MaxLegendWidth function returns the width in pixels of the longest Legend item string.

The NumLegendValues parameter determines how many Legend items should be considered.

This function traverses all Series Titles or Series points ( depending on Legend.LegendStyle ) and calculates the maximum width.

It is used internally to calculate Legend's width.


MaxLegendWidth method See also
See Also

TChartLegend.Font

TChartLegend.ColorWidth

TChartLegend.LegendStyle


MaxMarkWidth Method (TChart)
MaxMarkWidth Method

See also

Applies to

TChart, TDBChart components

Declaration

function MaxMarkWidth : Longint;

Description

This function returns the Maximum width of the Active Series Maximum Marks witdh. Series Marks must be Visible.

That can be used to adjust the Chart Margins in order to accomodate the biggest Series Mark.


MaxMarkWidth Method (TChartSeries)
MaxMarkWidth Method

Applies to

TChartSeries component

Declaration

function MaxMarkWidth : LongInt;

Description

Returns the maximum width of all Series Marks.


MaxMarkWidth See also
See Also

SeriesMarks.Clip


MaxPointsPerPage Property

See also

Applies to

TChart component

Declaration

property MaxPointsPerPage : LongInt;

Description

Default Value: 0

The MaxPointsPerPage property controls "TeeChart AutoPaging".

Setting it to a number greater than zero makes TeeChart to internally divide Series points in Pages.

You can then navigate across Chart pages by using the Chart.Page and Chart.NumPages properties.

For each Page, TeeChart will automatically calculate and display the corresponding Series points.

The last page can have less number of points than other pages. You can use the Chart.ScaleLastPage to control if last page will be "stretched" or not.


MaxPointsPerPage property See also
See Also

TChart.ScaleLastPage

TChart.Page

TChart.NumPages

TChart.OnPageChange


MaxTextWidth Method

Applies to

TChart, TDBChart components

Declaration

function MaxTextWidth : LongInt;

Description

This function returns the Maximum width of the Active Series Maximum XLabels width. That applies only to Series which have XLabels.


MaxValue Property

See also

Applies to

TChartValueList component

Declaration

property MaxValue : Double;

Description

The MaxValue property returns the highest of all values inside the list.

As new points are being added to Series, the TChartValueList object calculates the MaxValue, MinValue and TotalABS properties.

This applies to all Series lists of values, such as XValues, YValues, etc.

Calling TChartValueList.RecalcMinMax method forces to recalculate MaxValue, MinValue and TotalABS values.


MaxValue property See also
See Also

TChartValueList.MinValue

TChartValueList.TotalABS

TChartSeries.YValues

TChartValueList.RecalcMinMax


MaxXValue Example

Chart1.BottomAxis.Automatic := False ;

Chart1.BottomAxis.Maximum := Chart1.MaxXValue( Chart1.BottomAxis ) ;


MaxXValue Method

Example

Applies to

TChart, TDBChart components

Declaration

function MaxXValue (AAxis : TChartAxis): Double ;

Description

This function returns the calculted Maximum Horizontal value for the specified AAxis. AAxis can be TopAxis or BottomAxis.

Calculated means that the return value will the Maximum value of the Maximum Series X Values. Only Series with the HorizAxis equal to AAxis will be considered.


MaxXValue Method (TChartSeries)

Applies to

TChartSeries component

Declaration

function MaxXValue : Double; virtual;

Description

Returns the Maximum Value of the Series X Values List.


MaxYValue Example

Chart1.LeftAxis.Automatic := False ;

Chart1.LeftAxis.Maximum := Chart1.MaxYValue( Chart1.LeftAxis ) ;


MaxYValue Method (TChart)
MaxYValue Method

Example

Applies to

TChart, TDBChart components

Declaration

function MaxYValue (AAxis : TChartAxis ): Double;

Description

This function returns the calculted Maximum Vertical value for the specified AAxis. AAxis can be LeftAxis or RightAxis.

Calculated means that the return value will the Maximum value of the Maximum Series Y Values. Only Series with the VertAxis equal to AAxis will be considered.


MaxYValue Method (TChartSeries)

See also

Applies to

TChartSeries component

Declaration

function MaxYValue : Double; virtual;

Description

The MaxYValue function returns the highest of all the current Series Y point values.

Some special Series types override this function to calculate the maximum Y value correctly.

For example, the TCandleSeries component calculates the maximum Y value based on the highest Open or Close or High point values.

The TBubbleSeries component calculates the highest Y + Radius point.


MaxYValue method See also
See Also

TChartSeries.MinYValue

TChartSeries.MaxXValue

TChartSeries.MinXValue

TChart.MaxYValue

TChart.MinYValue

TChart.MaxXValue

TChart.MinXValue


MaxZOrder Property

See also

Applies to

TChart component

Declaration

property MaxZOrder : Longint

Description

Run-time and read only. The MaxZOrder property indicates the Chart depth in number of Series. When Chart.View3D is True, each Series has a Z order. The Series Z order defines the order along the Z axis when Series are displayed. The MaxZOrder property is the maximum Z order of all active Series. Some Series share a same Z order (stacked Bars, stacked Areas, etc).


MaxZOrder See also
See Also

TChartSeries.ZOrder

TChart.SeriesHeight3D

TChart.SeriesWidth3D


Maximum Property

See also

Applies to

TChartAxis component

Declaration

property Maximum:Double

Description

Axis Maximum is the highest value an Axis will use to scale their dependent Series point values.

It can be any number or DateTime value.

It must be greater than the Axis.Minimum value.

VERY IMPORTANT:

Axis.Automatic property must be FALSE.

If Axis.Automatic is True, the Axis will set Maximum and Minimum values to Maximum and Minimum dependent Series values.


Maximum See also
See Also

Axis Minimum

Axis Increment


MinValue Property

See also

Applies to

TChartValueList component

Declaration

property MinValue : Double;

Description

Run-time and read only. The MinValue property returns the lowest of all values inside the list.  See TChartValueList.MaxValue property for more information.


MinValue property See also
See Also

TChartValueList.MaxValue

TChartValueList.TotalABS

TChartSeries.YValues

TChartValueList.RecalcMinMax


MinXValue Example

Chart1.TopAxis.Automatic := False ;

Chart1.TopAxis.Minimum := Chart1.MinXValue( Chart1.TopAxis ) ;


MinXValue Method (TChart)
MinXValue Method

Example

Applies to

TChart, TDBChart components

Declaration

function MinXValue (AAxis: TChartAxis): Double;

Description

This function returns the calculted Minimum Horizontal value for the specified AAxis. AAxis can be TopAxis or BottomAxis.

Calculated means that the return value will the Minimum value of the Minimum Series X Values. Only Series with the HorizAxis equal to AAxis will be considered.


MinXValue Method (TChartSeries)

Applies to

TChartSeries component

Declaration

function MinXValue : Double; virtual;

Description

Returns the Minimum Value of the Series X Values List.


MinYValue Example

Chart1.RightAxis.Automatic := False ;

Chart1.RightAxis.Minimum   := Chart1.MinYValue( Chart1.RightAxis ) ;


MinYValue Method

Example

Applies to

TChart, TDBChart components

Declaration

function MinYValue (AAxis: TChartAxis): Double;

Description

This function returns the calculted Minimum Vertical value for the specified AAxis. AAxis can be LeftAxis or RightAxis.

Calculated means that the return value will the Minimum value of the Minimum Series Y Values. Only Series with the VertAxis equal to AAxis will be considered.


MinYValue Method (TChartSeries)

Applies to

TChartSeries component

Declaration

function MinYValue : Double; virtual;

Description

Returns the Minimum Value of the Series Y Values Lists. As some Series have more than one Y Values List, this Minimum Value is the "Minimum of Minimums" of all Series Y Values lists.


Minimum Property

See also

Applies to

TChartAxis component

Declaration

property Minimum : Double;

Description

Axis Minimum is the lowest value an Axis will use to scale their dependent Series point values. Can be any number or DateTime value.

Must be lower than the Axis.Maximum value.

VERY IMPORTANT:

Axis.Automatic property must be FALSE. If Axis.Automatic is True, the Axis will set Maximum and Minimum values to Maximum and Minimum dependent Series values.


Minimum See also
See Also

Axis Maximum

Axis


MinorTickCount Example

This code sets the number of Axis Minor ticks:

Chart1.LeftAxis.MinorTickCount := 4 ;


MinorTickCount Property

See also	Example

Applies to

TChartAxis component

Declaration

property MinorTickCount : Integer

Description

Default 3

The MinorTickCount property determines the number of Axis minor ticks. Axis minor ticks are the Axis sub-ticks between major ticks.

It should be a positive number greater than zero and less than half the number of pixels between major ticks, otherwise Minor ticks will "overlap".


MinorTickCount See also
See Also

TChartAxis.MinorTickLength

TChartAxis.MinorTicks


MinorTickLength Property

See also

Applies to

TChartAxis component

Declaration

property MinorTickLength : Integer;

Description

Default 2

The MinorTickLength property indicates the length in pixels of Axis Minor ticks. You can control the number of Minor ticks by using the TChartAxis.MinorTickCount property. Minor ticks are displayed using the TChartAxis.MinorTicks pen property.


MinorTickLength See also
See Also

TChartAxis.MinorTickCount

TChartAxis.MinorTicks


MinorTicks Example

This code changes the Axis Minor tick pen:

With Chart1.BottomAxis do

begin

  MinorTickCount := 5 ;

  BottomAxis.MinorTickLength := 8 ;  { pixels }

  BottomAxis.MinorTicks.Visible := True ;

  BottomAxis.MinorTicks.Color := clRed ;

  BottomAxis.MinorTicks.Width := 2 ;

end;


MinorTicks Property

See also	Example

Applies to

TChartAxis component

Declaration

property MinorTicks : TChartPen;

Description

The MinorTicks property is the Pen used to draw the Axis Minor ticks. Minor ticks will only be displayed if MinorTicks.Visible is True.


MinorTicks See also
See Also

TChartAxis.MinorTickCount

TChartAxis.MinorTickLength


Mode Property

Applies to

TChartPen component

Declaration

property Mode : TPenMode;

Description

The Mode property determines how the pen draws lines on the canvas.

See Delphi help:  TPen.Mode


ModifyValue Method

Applies to

TChartValueList component

Declaration

procedure ModifyValue (ValueIndex:Longint;Const AValue:Double);

Description

.


Monochrome Property

See also

Applies to

TChart component

Declaration

property Monochrome : Boolean;

Description

Default Value: False

The Monochrome property will allow Charts to be draw using only black and white colors. It's not yet completely implemented. Right now it uses the internal Bitmap.Monochrome property, and the output quality isn't really good.


Monochrome property See also
See Also

TChart.MonochromePrinting


MonochromePrinting Property

See also

Applies to

TChart component

Declaration

property MonochromePrinting : Boolean:

Description

Default Value: True

The MonochromePrinting property will allow Charts to be sent to the printer in black and white or color mode. This property will NOT change any Chart color. It will ONLY set the Printer to use the Black & White printer's mode. (If the printer is a color printer, like a HP850C printer).

The Chart.Monochrome property will allow charts to be drawn using Black & White colors only.


MonochromePrinting property See also
See Also

TChart.Monochrome


MultiArea Property

See also

Applies to

TAreaSeries component

Declaration

property MultiArea : TMultiArea

Description

Default maNone

The MultiArea property determines the kind of displayed Area when there's more than one AreaSeries with the same ParentChart. The default value is maNone, meaning all Areas will be drawn one behind the other. maStacked and maStacked100 modes will draw each Area on top of previous one. msStacked100 adjusts each individual point to a common 0..100 axis scale. The order which Series are accumulated depends on the Chart.SeriesList property.


MultiArea See also
See Also

TChartSeries.PointOrigin

MultiBar


MultiBar Property

See also

Applies to

TBarSeries and THorizBarSeries component

Declaration

property MultiBar : TMultiBar

Description

If you have more than one TBarSeries in the same Chart, then you can choose if they will be drawn side-by-side, back-to-front or Stacked. Side-by-side means the Bar width will be divided by the number of Bar Series.


MultiBar See also
See Also

TChartSeries.PointOrigin

TAreaSeries.MultiArea


Multiplier Property

Example

Applies to

TChartValueList component

Declaration

property Multiplier : Double;

Description

The Multiplier property will be used as a factor to convert all Series points X and / or Y values.


Multiplier property Example

LineSeries1.YValues.Multiplier := -5 ;


Name Property

Applies to

TChartValueList component

Declaration

property Name : String;

Description

The Name property is used to identify all Series lists of values. All Series have an "Y" and "X" value lists. Some Series have more lists of values, such as TCandleSeries, which have OpenValues, CloseValues, HighValues and LowValues lists.


NextPage Method

See also

Applies to

TChart, TDBChart components

Declaration

procedure NextPage;

Description

When MaxPointsPerPage is greater than Zero, TeeChart automatically divides point values in Pages. Calling NextPage is the same as Page := Page + 1 The NumPages chart property returns the total number of pages.


NextPage See also
See Also

MaxPointsPerPage

ScaleLastPage property

PreviousPage


NextTask Property

See also	Example

Applies to

TGanttSeries component

Declaration

property NextTask : TChartValueList;

Description

The NextTask property is a TList component that holds the Gantt bar index each Gantt bar is connected to.

When a Gantt bar is added to TGanttSeries, it's NextTask value is assigned to -1 by default. That means the Gantt bar is NOT connected to any other Gantt Bar.

You need to set a valid bar index to NextTask.


NextTask property Example

Example:

Let's add two Gantt bars:

GanttSeries1.Clear;

GanttSeries1.AddGantt( EncodeDate(1997,1,1),

                       EncodeDate( 1997,1,31),

                       5,  { <-- vertical user defined position }

                       'Some period...' );

GanttSeries1.AddGantt( EncodeDate(1997,3,1),

                       EncodeDate( 1997,3,31),

                       6,  { <-- vertical user defined position }

                       'Other period...' );

Now let's "connect" the first Gantt bar to the second:

GanttSeries1.NextTask[ 0 ] := 1 ;

GanttSeries1.Repaint;


NextTask property See also
See Also

TGanttSeries.AddGantt


NormalBarColor Property

See also

Applies to

TCustomBarSeries component

Declaration

property NormalBarColor : TColor;

Description

Run-time and read only.

The NormalBarColor property returns the color used to fill the Bar sides.

Each different Bar style uses NormalBarColor to fill a different Bar area.


NormalBarColor property See also
See Also

TCustomBarSeries.DarkColor

TCustomBarSeries.DarkerColor


NumPages Method

See also

Applies to

TChart component

Declaration

function NumPages : Longint;

Description

The NumPages function returns the number of Chart pages. The TChart.MaxPointsPerPage property must be greater than zero to activate auto paging.

The TChart.Page property determines the current visible page.

This code traverses all Chart pages:

for t := 1 to Chart1.NumPages do Chart1.Page := t ;


NumPages method See also
See Also

TChart.OnPageChange

TChart.MaxPointsPerPage

TChart.Page


NumSampleValues Example

The NumSampleValues function is now a "Class" function and can be called directly without creating any instance:

Var tmp : Longint;

tmp := TLineSeries.NumSampleValues;

instead of:

With TLineSeries.Create(Self) do

try

  tmp := NumSampleValues;

finally

  Free;

end;


NumSampleValues Method

See also	Example

Applies to

TChartSeries component

Declaration

function NumSampleValues : Longint;

Description

Each Series draws random values at design mode unless you connect the Series component to other Series component or to a DataSet (Table,SQL,TClientDataset) component.

This virtual function returns the predefined number of random values each Series draws.


NumSampleValues See also
See Also

FillSampleValues method


NumXValues Example

This code changes the Surface's grid size:

SurfaceSeries1.NumXValues := 50 ;

SurfaceSeries1.NumZValues := 40 ;


NumXValues Property

See also	Example

Applies to

TSurfaceSeries component

Declaration

property NumXValues : LongInt

Description

Default 20

The NumXValues property indicates the Surface's horizontal size in number of points. A Surface is a grid of NumXValues x NumZValues dimensions. You should use the OnGetYValue event to supply the corresponding vertical value for a given pair of "X,Z" coordinates. Changing NumXValues forces the Surface to recreate all values.


NumXValues See also
See Also

TSurfaceSeries.NumZValues

TSurfaceSeries.ReCreateValues

TSurfaceSeries.OnGetYValue


NumZValues Example

This code changes the Surface's grid size:

SurfaceSeries1.NumZValues := 10 ;

SurfaceSeries1.NumXValues := 15 ;


NumZValues Property

See also	Example

Applies to

TSurfaceSeries component

Declaration

property NumZValues : Longint

Description

Default 20

The NumZValues property indicates the Surface's depth size in number of points. A Surface is a grid of NumXValues x NumZValues dimensions. You should use the OnGetYValue event to supply the corresponding vertical value for a given pair of "X,Z" coordinates. Changing NumZValues forces the Surface to recreate all values.


NumZValues See also
See Also

TSurfaceSeries.NumXValues

TSurfaceSeries.ReCreateValues

TSurfaceSeries.OnGetYValue


OHLChart Unit

The OHLChart unit contains the declarations for the following components and for the enumerated type associated with them. When you add a component declared in this unit to a form, the unit is automatically added to the uses clause of that form's unit. The following items are declared in the this unit:

Components

TOHLCSeries

Types

Routines

To see a listing of items declared in this unit including their declarations, use the ObjectBrower.


OffsetPercent Example

This code sets 3 Bar series OffsetPercent to achieve an overlayed Bar chart:

BarSeries1.OffsetPercent := 25 ; { % of Bar width }

BarSeries2.OffsetPercent := 50 ; { % of Bar width }

BarSeries3.OffsetPercent := 75 ; { % of Bar width }


OffsetPercent Property

See also	Example

Applies to

TBarSeries and THorizBarSeries components (TCustomBarSeries)

Declaration

property OffsetPercent : Integer

Description

Default 0

The OffsetPercent property indicates the Bar displacement in percent of Bar size. Displacement is horizontal for TBarSeries and vertical for THorizBarSeries. This property can be used to create "overlayed" Bar charts. You can specify positive or negative values.


OffsetPercent See also
See Also

TBarSeries.BarWidth

THorizBarSeries.BarHeight

TCustomBarSeries.SideMargins

TCustomBarSeries.BarWidthPercent


OnAfterAdd Example

Here we use the OnAfterAdd event to arrange the XAxis scale as new points are added. }

procedure TScrollForm.LineSeries1AfterAdd(Sender: TChartSeries;

  ValueIndex: Longint);

begin

  With Sender.GetHorizAxis do  { <-- with the Horizontal Axis... }

    Begin

      Automatic := False;   { <-- we dont want automatic scaling }

      { In this example, we will set the Axis Minimum and Maximum values to show One Hour of data ending at last point Time plus 5 minutes}

      Minimum := 0;

      Maximum := Sender.XValues.MaxValue +

DateTimeStep[dtFiveMinutes ];

      Minimum := Maximum - DateTimeStep[ dtOneHour ];

    end;

end;


OnAfterAdd Event

Example

Applies to

TChartSeries component

Declaration

property OnAfterAdd : TSeriesOnAfterAdd;

Description

Every Series component has an OnAfterAdd event. This event is triggered whenever a new point has been Added or Inserted.


OnAfterDraw Event

See also

Applies to

TChart component

Declaration

property OnAfterDraw:  TNotifyEvent;

Description

This event gets called just after TChart has drawn all series.

Warning:

Do not modify any property in this event that would force a TChart repaint. Doing this will cause a recursive loop.


OnAfterDraw Event See also
See also

TChartSeries.AfterDrawValues

TChartSeries.BeforeDrawValues


OnAllowScroll Event

Applies to

TChart component

Declaration

property OnAllowScroll:  TChartAllowScrollEvent;

Description

Warning:

TChartAllowScrollEvent=Procedure     (	Sender:TChartAxis;

Var Amin, AMax: Double;

Var AllowScroll:Boolean ) of object;


OnBeforeAdd Event

Example

Applies to

TChartSeries component

Declaration

property OnBeforeAdd : TSeriesOnBeforeAdd;

Description

Every Series component has an OnBeforeAdd event. This event is triggered whenever a new point is going to be Added or Inserted. You can delegate this event in your Form's code to, for example, control if new points will be really added to the Series. This event also happens when a Series component is connected to a Table or Query.


OnBeforeAdd Example

Example 1 : In this example we'll deny points with Y values less than 100 to be added:

Function TForm1.OnBeforeAdd ( Sender : TChartSeries ) : Boolean ;

Begin

result := Sender.YValues.TempValue >= 100 ;

End ;

Example 2 : In this example we'll filter which Table records are valid : (Assuming Table1 is the Series.DataSource)

Function TForm1.OnBeforeAdd ( Sender : TChartSeries ) : Boolean ;

Begin

result := Table1MyDateField.AsDateTime >= StrToDate ( '1/1/96' ) ;

End ;


OnClearValues Event

Applies to

TChartSeries component

Declaration

property OnClearValues : TSeriesOnClear;

Description

This event will notify you when the Series Clears and removes their Point values.


OnClick Event

See also	Example

Applies to

TChartSeries component

Declaration

property OnClick : TSeriesClick

Description

TChartSeries components will notify you when users click on a Series point. Each TChartSeries component calculates if mouse coordinates are over a point screen regions. For example, TPieSeries point regions are the Pie Sectors. TBarSeries detects clicked Bar regions. The ValueIndex parameter is the Series point number.


OnClick event See also
See Also

TChartSeries.OnDblClick


OnClick Example

We will show a message to the user when he or she clicks a PieSeries chart:

procedure TForm1PieSeriesOnClick( Sender:TChartSeries; ValueIndex:Longint; Button:TMouseButton; Shift: TShiftState; X, Y: Integer);

Begin

ShowMessage ( 'This point value: ' + FloatToStr ( Sender.YValues [ ValueIndex ] ) ) ;

End;


OnClickAxis Event

See also

Applies to

TChart component

Declaration

property OnClickAxis : TChartClickAxis;

Description

An OnClickAxis event occurs whenever the user clicks near to a Chart axis subcomponent.

The Sender parameter specifies the Chart component that triggered the event.

The Axis parameter is the corresponding clicked Chart axis. It can be the LeftAxis, RightAxis, TopAxis or BottomAxis Chart subcomponent.

The Button, Shift, X and Y parameters determine the mouse button and mouse cursor coordinates at the time the axis was clicked.

This event has a higher priority than OnClickBackGround event and lower priority than OnClickSeries event.


OnClickAxis event See also
See Also

TChart.OnClickBackGround

TChart.OnClickLegend

TChart.OnClickSeries

TChart.OnDblClick


OnClickBackground Event

See also

Applies to

TChart component

Declaration

property OnClickBackground : TChartClick;

Description

An OnClickBackGround event occurs whenever the user clicks onto a Chart space outside Axis, Series points or Chart Legend.

It has the lower priority of all other mouse events.

The Sender parameter specifies the Chart component that originated the event.

The Button, Shift, X and Y parameters determine the mouse button and mouse cursor coordinates at the time the Chart was clicked.


OnClickBackground event See also
See Also

TChart.OnClickAxis

TChart.OnClickLegend

TChart.OnClickSeries

TChart.OnDblClick


OnClickLegend Event

See also

Applies to

TChart component

Declaration

property OnClickLegend : TChartClick;

Description

An OnClickLegend event occurs whenever the user clicks onto Chart Legend rectangle.

The Sender parameter specifies the Chart component that originated the event.

The Button, Shift, X and Y parameters determine the mouse button and mouse cursor coordinates at the time the Chart Legend was clicked.


OnClickLegend event See also
See Also

TChart.OnClickAxis

TChart.OnClickBackGround

TChart.OnClickSeries

TChart.OnDblClick


OnClickPointer Event

Applies to

TChartSeries component

Declaration

property OnClickPointer : TSeriesClickPointerEvent

Description

TSeriesClickPointerEvent=Procedure( Sender:TCustomSeries; ValueIndex:Longint; X, Y: Integer) of object; This event is similar to the OnClick event except it will only trigger when mouse clicks over Pointers, not Lines.


OnClickSeries Example

This event procedure shows the user at which series point (any drawn part of series) they have clicked.

procedure TForm1.DBChart1ClickSeries (Sender: TCustomChart;

  Series: TChartSeries; ValueIndex: Longint; Button: TMouseButton;

  Shift: TShiftState; X, Y: Integer);

begin

  ShowMessage(' Clicked Series: '+Series.Name+' at point: '+ inttostr(valueindex));

end;


OnClickSeries Event

See also	Example

Applies to

TChart component

Declaration

property OnClickSeries : TChartClickSeries;

Description

An OnClickSeries event occurs whenever the user clicks onto any Chart Series point. The Sender parameter specifies the Chart component that originated the event. The Series parameter is the corresponding clicked Series component, and the ValueIndex parameter refers to the exact clicked point in the Series. Series have also an OnClick event that can be used individually to catch clicked points. The Button, Shift, X and Y parameters determine the mouse button and mouse cursor coordinates at the time the Series point was clicked.

WARNING:

Use the CancelMouse property to control how the mouse button behaves with dual modes (scroll or zoom after a ClickOnSeries event)


OnClickSeries event See also
See Also

TChart.OnClickAxis

TChart.OnClickBackGround

TChart.OnClickLegend

TChart.OnDblClick

TChartSeries.OnClick

TChartSeries.OnClickPointer


OnDblClick Event

See also

Applies to

TChart component

Declaration

property OnDblClick : TNotifyEvent;

Description

An OnDblClick event occurs whenever the user double clicks onto a Chart. The Sender parameter specifies the Chart component that originated the event.

You must cast the Sender parameter to TChart or TDBChart class to use its properties and methods:

(Sender as TChart).Color := clYellow ;

To retrieve if user double clicked onto a Series point, you can use this code:

procedure TForm1.Chart1DblClick(Sender: TObject);

var tmp:Longint;

begin

tmp:=BarSeries1.GetCursorValueIndex;

if tmp<>-1 then

begin

{ show the point index }

ShowMessage('You double-clicked the: '+IntToStr( tmp )+' point !');

{ tell TeeChart NOT to continue with zoom or scroll }

CancelMouse;

end;

end;

The TChartSeries.GetCursorValueIndex function returns the corresponding point under mouse cursor position. It returns -1 if no point is under mouse cursor. The TChartSeries.GetCursorValues function returns the mouse cursor X and Y position in Axis scales coordinates. The TChartSeries.XScreenToValue and TChartSeries.YScreenToValue functions convert from screen pixel coordinates to Series scales.

WARNING:

Use the CancelMouse property to control how the mouse button behaves with dual modes (scroll or zoom after the OnDblClick event)

Example:

ShowMessage('Double-Clicked Chart!');

CancelMouse;


OnDblClick event See also
See Also

TChartSeries.GetCursorValueIndex

TChartSeries.GetCursorValues

TChartSeries.XScreenToValue

TChartSeries.YScreenToValue

TChartSeries.CalcXPos

TChartSeries.CalcYPos

TChartSeries.CalcXPosValue

TChartSeries.CalcYPosValue


OnDblClick Event TChartSeries
OnDblClick Event (TchartSeries)

See also

Applies to

TChartSeries component

Declaration

property OnDblClick : TSeriesClick

Description

TChartSeries components will notify you when users double click on a Series point. This is similar to the TChartSeries.OnClick event Each TChartSeries component calculates if mouse coordinates are over a point screen regions. For example, TPieSeries point regions are the Pie Sectors. TBarSeries detects clicked Bar regions. The ValueIndex parameter is the Series point number.


OnDblClick event TChartSeries See also
See Also

TChartSeries.OnClick


OnGetAxisLabel Event

Applies to

TChart, TDBChart components

Declaration

property OnGetAxisLabel : TAxisOnGetLabel

Description

An Event is triggered for each Axis Label painted. There are two different uses for OnGetAxisLabel:

1) : 	Axis Labels are Values. Is this case, the Series parameter will be nil, and the ValueIndex will be -1.

2) : 	Axis Labels are Series points. The Series parameter will be a valid TChartSeries, and the ValueIndex will be the current Series point position. You can change the LabelText referred parameter for drawing a different Axis Label.


OnGetBarStyle Event

See also	Example

Applies to

TCustomBarSeries components

Declaration

property OnGetBarStyle : TGetBarStyleEvent;

Description

The OnGetBarStyle event is called for every Bar that's going to be displayed. You can specify a different Bar style for each Bar point. Using this event overrides the BarStyle property.


OnGetBarStyle Example

This code will show specific Bar styles depending on Bar's Y values:

procedure TForm1.BarSeries1GetBarStyle(Sender: TCustomBarSeries; ValueIndex: Longint; var TheBarStyle: TBarStyle);

begin

if Sender.YValue[ ValueIndex ] < 1000 then

TheBarStyle := bsPyramid

else

TheBarStyle := bsRectangle ;

end;


OnGetBarStyle See also
See Also

TCustomBarSeries.BarStyle


OnGetColor Event

See also	Example

Applies to

TSurfaceSeries component

Declaration

property OnGetColor : TChartSurfaceGetColor

Description

The OnGetColor event occurs each time a Surface's polygon is displayed. Using this event, specific colors can be assigned to individual Surface polygons. Using this event can be time consuming.


OnGetColor Example

This code fills Surface polygons with random colors:

function TForm1.SurfaceSeries1GetColor(Sender: TChartSeries; ValueIndex: Longint): TColor;

begin

result := RGB( Random( 256 ), Random( 256 ), Random( 256 ) ) ;

end;


OnGetColor See also
See Also

TChartSeries.SeriesColor

TSurfaceSeries.UseColorRange

TSurfaceSeries.UsePalette


OnGetLegendPos Event

See also

Applies to

TChart component

Declaration

property OnGetLegendPos : TOnGetLegendPos;

Description

An OnGetLegendPos event occurs whenever a Legend item is going to be displayed.

You can used this event to force specific X , Y and / or XColor Legend pixel coordinates.

The Chart component calculates the default X,Y and XColor parameters before calling this event.

The Sender parameter is the Chart component that originated the event.

The Index parameter corresponds to the specific Legend item number going to be displayed. It can be either an Active Series Title or a Series point index, depending on the TChartLegend.LegendStyle property.


OnGetLegendPos event See also
See Also

TChartLegend.LegendStyle

TChart.OnGetLegendRect


OnGetLegendRect Event

See also

Applies to

TChart component

Declaration

property OnGetLegendRect : TOnGetLegendRect;

Description

An OnGetLegendRect event occurs whenever the Chart Legend is going to be displayed.

You can use this event to force an specific Legend position and dimensions.

The Rect parameter determines the default Legend position and dimensions in screen pixels.

After drawing the Legend, the available Chart space will be decreased to not overlap with Legend unless you set the TChartLegend.ResizeChart property to False.

When using this event you'll need to use the TChart.OnGetLegendPos event as well, to supply the exact coordinates for each Legend item.


OnGetLegendRect event See also
See Also

TChartLegend.Alignment

TChartLegend.OnGetLegendPos


OnGetLegendText Event

Example

Applies to

TChart, TDBChart components

Declaration

property OnGetLegendText : TOnGetLegendText

Description

You can use this event to override the text strings that TChartLegend paints.

TChartLegend has two different modes (or LegendStyles):

lsSeries 	Legend contains Series Names or Titles.

lsValues 	Legend contains a Series values or labels.

If the LegendStyle is lsAuto, TChartLegend paints in lsSeries mode if more than one Active Series exists in the Chart.


OnGetLegendText Example

By using this event, you can set the LegendText string parameter to your customized text:

procedure TForm1.DBChart1GetLegendText(Sender: TCustomChart; LegendStyle: TLegendStyle; Index: Longint; var LegendText: OpenString);

begin

if LegendStyle = lsSeries then

LegendText := 'My Series #: ' + IntToStr( Index )

else

LegendText := 'Value #: '+ IntToStr( Index ) ;

end;


OnGetMarkText Event

Example

Applies to

TChartSeries component

Declaration

property OnGetMarkText : TSeriesOnGetMarkText;

Description

This event notifies the user that a Mark Text String must be supplied. MarkText string contains the default text representation. You can alter MarkText for the Series to paint a customized mark.


OnGetMarkText Example

This example will show a customized point Mark at Point Index: 3

Procedure TForm1LineSeries1GetMarkText( Sender : TChartSeries ; ValueIndex : Longint ; Var MarkText : String )

Begin

if ValueIndex = 3 then

MarkText := 'Hello World';

End;


OnGetNextAxisLabel Event

See also

Applies to

TChart component

Declaration

property OnGetNextAxisLabel : TAxisOnGetNextLabel;

Description

An OnGetNextAxisLabel event is used to define custom Axis Labels. Using this event you can customize Axis Labels positions and values.

This event gets called in a loop until you set the Stop parameter to False OR the LabelValue parameter is BIGGER than the Axis Maximum value.

The Stop parameter is True by default, meaning that if it's not set to False the first time this event gets called, TeeChart will draw the default Axis Labels.

The Sender parameter specifies the Axis subcomponent. It can be the Chart LeftAxis, RightAxis, TopAxis or BottomAxis axis components.

The LabelIndex parameter is an incremental counter for you to know which Label the event is asking for a value.

The LabelValue parameter must be filled with the desired Axis Label value.

You can use the TChart.OnGetAxisLabel event to override the default Axis Labels text with your preferred Axis Label string representation.

An example of use of this event can be as follows:

procedure TAxisLabelsForm.Chart1GetNextAxisLabel(Sender: TChartAxis;

    LabelIndex: Longint; var LabelValue: Double; var Stop: Boolean);

  begin

    if Sender=Chart1.LeftAxis then

    Begin

      { In this example, we want the Vertical Left Axis to show

        labels only for positive values, starting at zero and

        with 250 label increment.

      }

      if LabelValue>=250 then LabelValue:=LabelValue+250

                         else LabelValue:=250;

    End;

    { we want more labels !! }

    Stop:=False;

  end;


OnGetNextAxisLabel event See also
See Also

TChart.OnGetAxisLabel

TChartAxis.Increment

TChartAxis.ExactDateTime


OnGetYValue Event

See also	Example

Applies to

TSurfaceSeries component

Declaration

property OnGetYValue : TChartSurfaceGetY

Description

The OnGetYValue event occurs when the Surface Series needs to recreate the grid of values. Calling the ReCreateValues method forces Surface Series to be created again. You should return the corresponding Y value for a given X and Z values. Usually you will place a formula or algorithm that calculates its value based on X and Z parameters.


OnGetYValue Example

The following code is the Surface demo formula:

function TForm1.SurfaceSeries1GetYValue(Sender: TChartSeries; X, Z: Longint): Double;

begin

result:=0.5*sqr(Cos(x/(SurfaceSeries1.NumXValues*0.2)))+

sqr(Cos(z/(SurfaceSeries1.NumZValues*0.2)))-

cos(z/(SurfaceSeries1.NumZValues*0.5));

end;


OnGetYValue See also
See Also

TSurfaceSeries.CreateValues

TSurfaceSeries.ReCreateValues

TSurfaceSeries.AddXYZ


OnPageChange Event

See also	Example

Applies to

TChart component

Declaration

property OnPageChange : TNotifyEvent;

Description

An OnPageChange event occurs whenever the TChart.Page property has been changed and before the Chart repaints the new page points.

The TChart.MaxPointsPerPage property must be greater than zero to activate the automatic paging mechanism.

This event DOES NOT get called the first time the TChart.Page property is set to 1.


OnPageChange event Example

You can use this event to, for example, display the current Chart page:

procedure TForm1.Chart1PageChange(Sender: TObject);

begin

Label1.Caption:='Current page: '+IntToStr( (Sender as TChart).Page )+ ' of '+IntToStr((Sender as TChart).NumPages ) ;

end;


OnPageChange event See also
See Also

TChart.MaxPointsPerPage

TChart.Page

TChart.PreviousPage

TChart.NextPage

TChart.NumPages


OnProcessRecord Event

See also

Applies to

TDBChart component

Declaration

property OnProcessRecord : TProcessRecordEvent;

Description

An OnProcessRecord event occurs for each record that is retrieved from the database.

The TDBChart component triggers this event whenever a new point has been added to the Series.

The DataSet parameter is the database component ( Table, Query, etc ) from which records are being loaded.

You can raise an Abort silent exception in this event to notify TDBChart to stop retrieving records and to NOT add the current record point.


OnProcessRecord event See also
See Also

TDBChart.RefreshData

TDBChart.RefreshDataSet

TChartSeries.DataSource


OnScroll Event

See also

Applies to

TChart component

Declaration

property OnScroll : TNotifyEvent;

Description

An OnScroll event occurs when users scroll Chart contents by dragging the right mouse button.

This event gets called repeteadly while users move the mouse BEFORE the Chart component is repainted to show the new Axis scales.

You can use this event toghether with TChart.OnZoom and TChart.OnUndoZoom events to know changes on Axis scales.


OnScroll event See also
See Also

TChartAxis.Scroll

TChartAxis.SetMinMax

TChart.OnUndoZoom

TChart.OnZoom


OnUndoZoom Event

See also	Example

Applies to

TChart component

Declaration

property OnUndoZoom : TNotifyEvent;

Description

An OnUndoZoom event occurs when Chart Axis scales are reset to the Minimum and Maximum values that fit all Series points. Users can undo zoom by dragging the left mouse button drawing a rectangle from bottom-right to top-left. You can undo zoom by calling the TChart.UndoZoom procedure. Both techniques cause this event to be triggered. You can use this event together with TChart.OnZoom and TChart.OnScroll events to react to changes in Axis scales.


OnUndoZoom event Example
OnUndoZoom Example

This code will reset axis scales at UndoZoom event:

procedure TForm1.Chart1UndoZoom(Sender: TObject);

begin

With Sender as TChart do

begin

LeftAxis.SetMinMax(  0, 100 );

BottomAxis.SetMinMax(  EncodeDate( 1996,1,1), EncodeDate( 1996,12,31) );

end;

end;


OnUndoZoom event See also
See Also

TChart.OnScroll

TChart.UndoZoom

TChart.OnZoom

TChart.ZoomPercent

TChart.ZoomRect

TChartAxis.Scroll

TChartAxis.SetMinMax


OnZoom Event

See also

Applies to

TChart component

Declaration

property OnZoom : TNotifyEvent;

Description

An OnZoom event occurs whenever Chart contents is being zoomed.

Zoom can be performed by dragging the mouse at run-time or by calling the TChart.ZoomRect or TChart.ZoomPercent methods.

This event gets called BEFORE the Chart component is repainted to show the new Axis scales.

You can use this event toghether with TChart.OnUndoZoom and TChart.OnScroll events to know changes on Axis scales.


OnZoom event See also
See Also

TChart.OnScroll

TChart.OnUndoZoom

TChart.UndoZoom

TChart.ZoomPercent

TChart.ZoomRect

TChartAxis.Scroll

TChartAxis.SetMinMax


OpenValues Property

See also	Example

Applies to

TOHLCSeries component

Declaration

property OpenValues : TChartValueList;

Description

The OpenValues property is used to store all Stock market Open values.

You can access Open values in the same way you can access X or Y values.


OpenValues property Example

{ this code makes all Candle Open values the same as Low values }

With CandleSeries1 do

begin

for t:= 0 to Count - 1 do OpenValues[ t ]:= LowValues[ t ];

Repaint;

end;


OpenValues property See also
See Also

TOHLCSeries.CloseValues

TOHLCSeries.DateValues

TOHLCSeries.HighValues

TOHLCSeries.LowValues


Order Example

This code creates a new TLineSeries component that draws a triangle:

LineSeries1.Clear;

LineSeries1.XValues.Order:=loNone;

LineSeries1.AddXY(-100,  0,'',clRed);

LineSeries1.AddXY(   0,100,'',clBlue);

LineSeries1.AddXY( 100,  0,'',clGreen);

LineSeries1.AddXY(-100,  0,'',clYellow);  { the closing line }


Order Property

See also	Example

Applies to

TChartValueList component

Declaration

property Order : TChartListOrder

Description

Run-time only. The Order property determines if points will be automatically sorted or it they will remain always at their original positions. This Order is used by default by the Series XValues to draw lines from Left to Right. Setting the XValues.Order property to loNone will respect the points order at point creation. This can be used to draw polygons.


Order See also
See Also

TChartValueList


OriginalCursor Property

Unit

Chart

Applies to

All TeeChart components

Declaration

property OriginalCursor : TCursor;

Description

This public property returns the original Chart.Cursor property. Used to reset the cursor when the mouse moves over the series.


OtherSide Property

See also

Applies to

TChartAxis component

Declaration

property OtherSide : Boolean;

Description

Run-time and read only. This property returns true if the Axis is the RightAxis or TopAxis. Chart.TopAxis and Chart.RightAxis are in the OtherSide. Chart.LeftAxis and Chart.BottomAxis are not in the OtherSide.

Chart Axis	Horizontal	OtherSide

==================================

LeftAxis	False	False

TopAxis	True	True

RightAxis	False	True

BottomAxis	True	False

==================================


OtherSide See also
See Also

Axis.Horizontal function

TChartAxis.Horizontal

TChartAxis


Owner Property

Applies to

TChartValueList component

Declaration

property Owner : TChartSeries;

Description

Read-only and run time.

The Owner property returns the TChartSeries that owns the TChartValueList.

It can be only accessed at run-time and it's read-only.


Page Property

See also

Applies to

TChart component

Declaration

property Page : LongInt;

Description

Run-time only.

The Page property determines the current visible points of Series in a Chart with MaxPointsPerPage property greater than zero.

When TChart.MaxPointsPerPage property is greater than zero, TeeChart internally divides all Series points in "pages".

Each page is assigned a different initial and ending X coordinates.

The TChart.NumPages property returns the total number of pages. It equals to the total number of Series points divided the MaxPointsPerPage property.

The TChart.PreviousPage and TChart.NextPage methods decrement or increment the Page property respectively.


Page Property See also
See also

TChart.MaxPointsPerPage

TChart.NextPage

TChart.NumPages

TChart.PreviousPage


Palette Example

You can create a customized Palette programatically:

SurfaceSeries1.ClearPalette;

SurfaceSeries1.AddPalette( 1000, clRed);

SurfaceSeries1.AddPalette( 2000, clYellow);

SurfaceSeries1.AddPalette( 3000, clWhite);

This will fill Surface polygons which the corresponding color based on the point Y value. So, for a given Surface point Y value of 2500, the clWhite color will be used.

You can then use the Palette property to access it's values:

TSurfacePalette( SurfaceSeries1.Palette[ 0 ] ).Color := clBlue ;


Palette Property

See also	Example

Applies to

TSurfaceSeries component

Declaration

property Palette : TList

Description

Run-time only. The Palette property is a standard Delphi TList object that stores the color palette used to fill the Surface polygons. This Palette list will be only used when UsePalette is True.

It stores the following object:

TSurfacePalette = Object

UpToValue : Double;

Color : TColor;

end;


Palette See also
See Also

TSurfaceSeries.AddPalette

TSurfaceSeries.ClearPalette

TSurfaceSeries.Palette

TSurfaceSeries.UsePalette


PaletteSteps Example

SurfaceSeries1.PaletteSteps := 100;


PaletteSteps Property

See also	Example

Applies to

TSurfaceSeries component

Declaration

property PaletteSteps : LongInt;

Description

Default 32

The PaletteSteps property indicates the number of entries in the default color Palette. As more steps, more different colors will be used to fill the Surface polygons. Setting this property forces TSurfaceSeries to recreate the default color palette.


PaletteSteps See also
See Also

TSurfaceSeries.AddPalette

TSurfaceSeries.ClearPalette

TSurfaceSeries.Palette

TSurfaceSeries.UsePalette


ParentChart Example

In Form1, we'll create and show another Form (Form2), and assign Form1.LineSeries1 to Form2.ChartInForm2 :

With TForm2.Create(Self) do

try

Self.LineSeries1.ParentChart := ChartInForm2 ;

ShowModal ;

finally

Free ;

end ;

That will show Form2 (containing a Chart component) and drawing Form1.LineSeries1.


ParentChart Property (TChartSeries)
ParentChart Property

Example

Applies to

TChartSeries component

Declaration

property ParentChart : TCustomChart

Description

The Series.ParentChart propery is mandatory. Each Series component must be "attached" to either a TChart or a TDBChart component. You can change which Chart component will "own" the Series both at design and run-time. When you add a series to a Chart using the Chart editor, ParentChart is set automatically - otherwise you may set it via the Object Inspector.

Advanced:

You can also set the Series.ParentChart property to Chart components in different Forms:


ParentChart Property (TChartTitle)

Applies to

TChartTitle component

Declaration

property ParentChart : TChart;

Description

The ParentChart property is a reference to the TChart component that owns the TChartTitle.


ParentSeries Property (TSeriesPointer)

See also

Applies to

TSeriesPointer component

Declaration

property ParentSeries : TChartSeries;

Description

Run-time and read only.

The ParentSeries property returns the TChartSeries owner of Pointer subcomponent.


ParentSeries Property (TSeriesMarks)

See also

Applies to

TSeriesMarks component

Declaration

property ParentSeries : TChartSeries;

Description

Read-only and run time.

The ParentSeries property returns the Series component that owns the TSeriesMarks subcomponent.

All Series types own a Marks subcomponent of TSeriesMarks class.


ParentSeries property (TSeriesMarks) See also
See Also

TChartSeries.Marks


ParentSeries property See also
See Also

TPointSeries.Pointer


PatternColors Property

See also

Applies to

TChartLegend component

Declaration

property PatternColors : Boolean;

Description

Default True

Run-time only. The PatternColors property indicates Legend will use the corresponding Brush style of each Series to fill the Legend.ColorWidth rectangle. It's available at run-time. It will probably be included at design-mode in future TeeChart upgrades. Some Series like TPieSeries allow to specify a different Brush style for each Point.


PatternColors See also
See Also

TChartLegend.ColorWidth

TLineSeries.LineBrush

TAreaSeries.AreaBrush

TPieSeries.UsePatterns

TBarSeries.BarBrush


PatternPalette Global Constant

See also

Applies to

Global Constant

Declaration

Const MaxDefaultPatterns = 6;

PatternPalette : Array[1..MaxDefaultPatterns] of TBrushStyle =

( bsHorizontal, bsVertical, bsFDiagonal, bsBDiagonal, bsCross, bsDiagCross);

Description

The PatternPalette stores a default set of Brush patterns. These patterns are used in TPieSeries component to paint each different  pie slice with a different brush style.

A future TeeChart version will increment the number of available brush patterns.


PatternPalette Global Constant See also
See Also

TPieSeries.UsePatterns


Pen Property (TCandleSeries)

Applies to

TCandleSeries component

Declaration

property Pen : TPen;

Description

The Pen property returns the CandlesSeries.Pointer.Pen property.


Pen Property (TChartShape)

See also

Applies to

TChartShape component

Declaration

property Pen : TPen;

Description

The Pen property speficies the pen used to draw the shape.


Pen Property (TChartWall)

See also

Applies to

TChartWall component

Declaration

property Pen : TChartPen

Description

The Pen property determines the kind of pen used to draw the Chart Walls frame. The Chart.View3DWalls property should be True to make walls visible.


Pen Property (TPolarSeries)

See also	Example

Applies to

TPolarSeries component

Declaration

property Pen : TChartPen

Description

The Pen property indicates the kind of pen used to draw the Line connecting PolarSeries points. Points can be displayed by seting the Pointer.Visible property to True. You can set the Pen used to draw the circle using the PiePen property.


Pen Property (TSeriesPointer)
Pen Property

See also

Applies to

TSeriesPointer component

Declaration

property Pen : TChartPen;

Description

The Pen property determines the kind of pen used to draw a frame around Series Pointers.

You can make it invisible by setting Pen.Visible property to False.


Pen Property (TSurfaceSeries)
Pen Property

See also

Applies to

TSurfaceSeries component

Declaration

property Pen : TChartPen

Description

The Pen property determines the kind of pen used to draw the Surface polygons. You can make it invisible by turning to False the Pen.Visible property.


Pen See also
See Also

TChartPen

TSurfaceSeries.WireFrame


Pen property (TChartShape) See also
See Also

TChartShape.Brush


Pen property (TChartWall) See also
See Also

TChart.View3DWalls

TChartWall.Brush

TChartWall.Color


Pen property (TPolarSeries) Example

This changes the PolarSeries line color to blue:

PolarSeries1.Pen.Color:= clBlue ;


Pen property (TPolarSeries) See also
See Also

TPolarSeries.Pointer

TCircledSeries.PiePen


Pen property (TSeriesPointer) See also
See Also

TSeriesPointer.Brush

TSeriesPointer.Visible


PercentFormat Example

BubbleSeries1.PercentFormat := '##0.0# %';

See Delphi help under FormatFloat Function for complete details.


PercentFormat Property

Example

Applies to

TChartSeries component

Declaration

property PercentFormat : String;

Description

Chart Series components have a PercentFormat property. PercentFormat is a standard Delphi formatting string specifier. It is used to draw the Series Marks Percent Style figures.


PercentOf Global Constant

Example

Applies to

All TeeChart components

Declaration

property PercentOf : String[10];

Description

The PercentOf global string variable contains the default text separator between percents and totals.

The default value is " of ".

This shows: " 23 % of 34555 "

Changing PercentOf at runtime will NOT automatically redraw the Chart. You will need to call Chart.Invalidate for the Chart to being repainted.


PercentOf Global Constant Example

PercentOf := ' of total: ' ;

Chart1.Invalidate ;


Period Property

See also	Example

Applies to

TTeeFunction component

Declaration

property Period : Double;

Description

The Period property controls how many points or X range(sse note below) will trigger a new point calculation.

For example, TAverageTeeFunction uses the Period property to calculate a new average point each time the "Period" number of points or X range(see note below) is exceed.

In TeeChart Pro only you can switch between number of points or X range by using the TTeeFunction.PeriodStyle property. In TeeChart standard runtime version, period will always use points.


Period property Example

For example, this code uses a TTeeFunction to show one point for every 5 points in the Series2 datasource series:

Series1.Pointer.Visible:= True;

Series2.Pointer.Visible:= True;

Series1.DataSource:= Series2;

Series1.FunctionType.Period:= 5;


Period property See also
See Also

TTeeFunction.PeriodStyle

FunctionType_property


PeriodStyle Property

See also	Example

Applies to

TTeeFunction component

Declaration

property PeriodStyle : TPeriodFunctionStyle;

Description

TPeriodStyle property only applies to TeeChart Pro. For TeeChart PeriodStyle will use the default value (POINTS) in all cases.

Default Value: msNumPoints

The PeriodStyle property controls how the Period property is interpreted.

By default is msNumPoints, meaning Period is specified in number of points.

msRange means Period property is specified in a range of values.


PeriodStyle property Example

{ Set Series1 to plot an Expaverage value every 5 POINTS }

Series1.SetFunction(TExpAverageTeeFunction.Create(Self));

Series1.FunctionType.Period := 5 ;

Series1.FunctionType.PeriodStyle := msNumPoints ;

{ Set Series1 to plot an average value every 5 DAYS }

Series1.SetFunction(TExpAverageTeeFunction.Create(Self));

Series1.FunctionType.Period := 5 ;

Series1.FunctionType.PeriodStyle := msRange ;


PeriodStyle property See also
See Also

TTeeFunction.Period

FunctionType_property


PiePen Property

See also

Applies to

TCircledSeries component

Declaration

property PiePen : TChartPen;

Description

The PiePen property determines the kind of pen used to draw the outmost circle.


PiePen See also
See Also

TPolarSeries.Pen

TCircledSeries.Circled


PieValues Property

See also

Applies to

TPieSeries component

Declaration

property PieValues : TChartValueList;

Description

The PieValues property stores the Pie slice values. It's a standard TList, so you can access it as follows:

tmp := PieSeries1.PieValues[ 3 ] ;

Warning:

You should call AddPie to ADD Pie points and Delete to REMOVE Pie points.


PieValues property See also
See Also

TPieSeries.AddPie

TChartSeries.Delete


PointOrigin Method

See also

Applies to

TChartSeries component

Declaration

function PointOrigin(ValueIndex: Longint; SumAll: Boolean): Double;

Description

The PointOrigin function returns the summed values of more than one Series point. The summed values are those returned by GetMarkValue function. It's only used by Series types with Stacked or Stacked 100% styles such as TBarSeries, THorizBarSeries and TAreaSeries.


PointOrigin See also
See Also

TChartSeries.GetMarkValue

TBarSeries.MultiBar

THorizBarSeries.MultiBar

TAreaSeries.MultiArea


PointToAngle Method (TCircledSeries)
PointToAngle Method

See also

Applies to

TCircledSeries component

Declaration

function PointToAngle( x , y : Longint ) : Double;

Description

The PointToAngle function returns the angle from the XY point parameter to the circle center. It currently works with Circled ellipses.

The formula used to calculate the Angle is:

result:=ArcTan(Abs(y-CircleYCenter)/Abs(x-CircleXCenter));

Angles are returned in radians from 0 to 2*PI.


PointToAngle Method (TPieSeries)

Applies to

TPieSeries component

Declaration

function PointToAngle ( x , y : Longint ) : Double ;

Description

Given a point in pixel coordinates (x,y) this function returns the corresponding Angle (0 to 360). This is used internally by TPieSeries to calculated the Clicked Pie Sector.


PointToAngle method (TCircledSeries) See also
See Also

TCircledSeries.AngleToPos

TCircledSeries.RotationAngle

TCircledSeries.XRadius

TCircledSeries.YRadius


Pointer Property (TPointSeries)
Pointer Property

Applies to

TPointSeries component

Declaration

property Pointer : TSeriesPointer;

Description

The Pointer property is a subcomponent of TPointSeries, TLineSeries and all other derived TPointSeries components like TBubbleSeries, TPolarSeries and TCandleSeries.

Each point in a TPointSeries is drawn using the Pointer properties.

Pointer contains several properties to control the formatting attributes of Points like Pen, Brush, Draw3D, Visible, etc.

Please refer to TSeriesPointer help page for a complete description of TSeriesPointer subcomponent.


Pointer Property (TPolarSeries)

Applies to

TPolarSeries component

Declaration

property Pointer : TSeriesPointer;

Description

The Pointer property is a subcomponent of TPointSeries, TLineSeries and all other derived TPointSeries components like TBubbleSeries, TPolarSeries and TCandleSeries.

Each point in a TPolarSeries is drawn using the Pointer properties.

Pointer contains several properties to control the formatting attributes of Points like Pen, Brush, Draw3D, Visible, etc.

Please refer to TSeriesPointer help page for a complete description of TSeriesPointer subcomponent.


PolyDegree Property

Applies to

TCurveFittingFunction component

Declaration

property PolyDegree : Integer;

Description

The PolyDegree property is the number of degrees a TCurveFittingFunction polynomy will have.

Warning:

With more degrees, more adjustment is achieved, however, values greater than 10 can slow the process.


PosAxis Property

See also	Example

Applies to

TChartAxis component

Declaration

property PosAxis : Integer;

Description

Run-time and read only.

The PosAxis property returns the corresponding Axis position in logical coordinate. This position corresponds to an horizontal coordinate for LeftAxis and RightAxis, and a vertical coordinate for TopAxis and BottomAxis components.

It is calculated when Axis line is being drawn.

It can used to detect Axis mouse clicks or to custom draw at Axis relative positions.

The TChart.ChartRect and TChart.ChartBounds properties determine the TChart rectangle and TChartAxis dimensions.


PosAxis property Example

This code draws a second Axis line of "clRed" color:

procedure TForm1.Chart1AfterDraw(Sender: TObject);

begin

With Chart1,Canvas do

begin

Pen.Color:=clRed;

Pen.Width:=2;

MoveTo(ChartRect.Left,BottomAxis.PosAxis);

LineTo(ChartRect.Right,BottomAxis.PosAxis);

end;

end;

Using the TChart.ChartRect and TChartAxis coordinates properties makes same code to both draw onto Screen and Printer. Never use absolute properties:

BAD:   LineTo( 50, 75 );

GOOD:  LineTo( ChartRect.Left + 50, ChartRect.Bottom + 75 );


PosAxis property See also
See Also

TChart.ChartBounds

TChart.ChartRect

TChartAxis.CustomDraw

TChartAxis.CustomDrawMinMax

TChartAxis.PosLabels

TChartAxis.PosTitle


PosLabels Property

See also

Applies to

TChartAxis component

Declaration

property PosLabels : Integer;

Description

Run-time and read only.

The PosLabels property returns the corresponding Axis Labels position in logical coordinate. This position corresponds to an horizontal coordinate for LeftAxis and RightAxis Labels, and a vertical coordinate for TopAxis and BottomAxis Labels.

It is calculated when Axis labels are being drawn. Axis Labels rotation and font size do not affect this property.

It can used to detect Axis Labels mouse clicks or to custom draw at Axis Labels relative positions.

The TChart.ChartRect and TChart.ChartBounds properties determine the TChart rectangle and TChartAxis dimensions.

Please read TChartAxis.PosAxis property description for an example of use.


PosLabels property See also
See Also

TChart.ChartBounds

TChart.ChartRect

TChartAxis.CustomDraw

TChartAxis.CustomDrawMinMax

TChartAxis.PosAxis

TChartAxis.PosTitle


PosTitle Property

See also

Applies to

TChartAxis component

Declaration

property PosTitle : Integer;

Description

Run-time and read only.

The PosTitle property returns the corresponding Axis Labels position in logical coordinate. This position corresponds to an horizontal coordinate for LeftAxis and RightAxis Labels, and a vertical coordinate for TopAxis and BottomAxis Labels.

It is calculated when Axis Title text is being drawn. Axis Title rotation and font size do not affect this property.

It can used to detect Axis Labels mouse clicks or to custom draw at Axis Labels relative positions.

The TChart.ChartRect and TChart.ChartBounds properties determine the TChart rectangle and TChartAxis dimensions.

Please read TChartAxis.PosAxis property description for an example of use.


PosTitle property See also
See Also

TChart.ChartBounds

TChart.ChartRect

TChartAxis.CustomDraw

TChartAxis.CustomDrawMinMax

TChartAxis.PosAxis

TChartAxis.PosLabels


PrepareCanvas Method

See also

Applies to

TSeriesPointer component

Declaration

procedure PrepareCanvas(ColorValue : TColor);

Description

The PrepareCanvas method arranges all internal Canvas properties like Pen, Brush and background color to be ready to draw the Series pointer.

The ColorValue parameter is used as the pointer background color.

This method is internally called by many Series types.


PrepareCanvas method See also
See Also

TSeriesPointer.Draw


PreviousPage Method

See also

Applies to

TChart, TDBChart components

Declaration

procedure PreviousPage ;

Description

When MaxPointsPerPage is greater than Zero, TeeChart automatically divides point values in Pages. Calling PreviousPage is the same as Page := Page - 1 The NumPages chart property returns the total number of pages.


PreviousPage See also
See Also

MaxPointsPerPage

ScaleLastPage property

NextPage


Print Method

See also

Applies to

TChart, TDBChart components

Declaration

procedure Print ;

Description

This method will send the Chart to the currently selected Printer. The current Printer orientation (Portrait or Landscape) can be changed prior to call PrintRect.


Print See also
See Also

PrintPortrait

PrintOrientation

PrintLandscape

PrintRect

PrintPartial

Draw


PrintLandscape Method

See also

Applies to

TChart, TDBChart components

Declaration

procedure PrintLandscape;

Description

This method will set the current Printer orientation to Portrait (Vertical paper). Then, the default Chart.Print method will be called and the previous Printer orientation will be restored.


PrintLandscape See also
See Also

PrintPortrait

PrintOrientation

Print

PrintRect

PrintPartial

Draw


PrintMargins Example

This code prints a Chart at Top / Right paper corner:

With Chart1 do

begin

PrintMargins.Left := 60 ;

PrintMargins.Top  := 5 ;

PrintMargins.Right:= 10 ;

PrintMargins.Bottom:= 75 ;

PrintLandscape;

end;


PrintMargins Property

See also	Example

Applies to

TChart component

Declaration

property PrintMargins : TRect;

Description

Default  ( 15, 15, 15, 15 )

Run-time and read only. The PrintMargins property defines the Left, Top, Right and Bottom printer paper margins. These margins are expressed in percent of paper dimensions.


PrintMargins See also
See Also

TChart.Print

TChart.PrintRect

TChart.PrintResolution


PrintOrientation Method

See also

Applies to

TChart, TDBChart components

Declaration

procedure PrintOrientation ( AOrientation : TPrinterOrientation ) ;

Description

This method will send the Chart to the currently selected Printer forcing the paper orientation to be AOrientation. The old Printer orientation is restored after printing.


PrintOrientation See also
See Also

PrintPortrait

PrintLandscape

PrintRect

PrintPartial

Draw


PrintPartial Method

See also

Applies to

TChart, TDBChart components

Declaration

procedure PrintPartial ( Const R : TRect ) ;

Description

This method will send the Chart to the currently selected Printer, scaled to the R rectangular region. The current Printer orientation (Portrait or Landscape) can be changed prior to call PrintRect. The biggest rectangular region is the (0,0,Printer.PageWidth-1,Printer.PageHeight-1)

The main difference between PrintPartial and PrintRect is that the first one does not call the Printer BeginDoc and EndDoc methods.


PrintPartial See also
See Also

PrintPortrait

PrintOrientation

PrintLandscape

PrintRect

Draw


PrintPartialCanvas Method

See also	Example

Applies to

TChart component

Declaration

procedure PrintPartialCanvas( PrintCanvas: TCanvas; Const PrinterRect: TRect);

Description

The PrintPartialCanvas method can be used to send a Chart to the Printer device. This method assumes the Printer job has been started and do not ejects the Printer page. You can determine the printed chart position and dimensions in the PrinterRect parameter.

This method allows printing more than one chart on the same page, or printing charts, custom text and custom drawings.

The TChart.PrintResolution property controls how much "wysiwyg" printing will be applied.


PrintPartialCanvas method Example

This code prints a chart on an already started printed job:

Chart1.PrintPartialCanvas(Printer.Canvas, Rect( 200, 200, 1000, 1000));

There are many other methods to print charts. See "See Also".


PrintPartialCanvas method See also
See Also

TChart.Print

TChart.PrintLandscape

TChart.PrintOrientation

TChart.PrintPartial

TChart.PrintPartialCanvasToScreen

TChart.PrintPortrait

TChart.PrintRect

TChart.PrintResolution


PrintPartialCanvasToScreen Method

See also

Applies to

TChart component

Declaration

procedure PrintPartialCanvasToScreen( PrintCanvas: TCanvas; Const ScreenRect,PaperRect: TRect);

Description

The PrintPartialCanvasToScreen method allows drawing charts to screen canvases as they would look on a printer device.

The ScreenRect parameter defines the destination rectangle coordinates in pixels.

The PaperRect parameter defines virtual rectangle coordinates in printer units.

This method is used internally by the Print Preview Dialog to output chart contents to an imaginary "paper" drawn on screen.

There's currently a problem due to using Delphi canvases and anisotropic canvas mode that makes Windows GDI resources to decrease until the application is closed.


PrintPartialCanvasToScreen method See also
See Also

TChart.Print

TChart.PrintLandscape

TChart.PrintOrientation

TChart.PrintPartial

TChart.PrintPartialCanvas

TChart.PrintPortrait

TChart.PrintRect

TChart.PrintResolution


PrintPortrait Method

See also

Applies to

TChart, TDBChart components

Declaration

procedure PrintPortrait ;

Description

This method will set the current Printer orientation to Portrait (Vertical paper). Then, the default Chart.Print method will be called and the previous Printer orientation will be restored.


PrintPortrait See also
See Also

PrintLandscape

PrintOrientation

Print

PrintRect

PrintPartial

Draw


PrintRect Method

See also

Applies to

TChart, TDBChart components

Declaration

procedure PrintRect ( Const R : TRect ) ;

Description

This method will send the Chart to the currently selected Printer, scaled to the R rectangular region. The current Printer orientation (Portrait or Landscape) can be changed prior to call PrintRect. The biggest rectangular region is the (0,0,Printer.PageWidth-1,Printer.PageHeight-1)


PrintRect See also
See Also

PrintPortrait

PrintOrientation

PrintLandscape

PrintPartial

Draw


PrintResolution Property

See also

Applies to

TChart component

Declaration

property PrintResolution : Integer

Description

Default  0

Run-time and read only.The PrintResolution property controls how screen pixels will be mapped to printer pixels. By default it's zero, meaning screen proportions will be respected when printing. To get smaller fonts and thinner lines, you should set PrintResolution to a negative number.

Chart1.PrintResolution := 0 ; { this will use screen resolution }

Chart1.PrintResolution := -100 ; { this will use more printer resolution }


PrintResolution See also
See Also

TChart.Print

TChart.PrintMargins


PrintTeePanel Global Variable

See also

Applies to

Global

Declaration

property PrintTeePanel : Boolean;

Description

Default False

This variable controls if Chart background panel color will be

used when printing.

By default Chart panel is White when printing.

It affects all Chart components as it's a global variable.


PrintTeePanel See also
See Also

TChart.Print


Printing Property

See also

Applies to

TChart component

Declaration

property Printing : Boolean;

Description

Run-time and read only. The Printing property indicates Chart is being printed.


Printing See also
See Also

TChart.Print


QRTee Unit

The QRTee unit contains the declarations for the following components and for the enumerated type associated with them. When you add a component declared in this unit to a form, the unit is automatically added to the uses clause of that form's unit. The following items are declared in the this unit:

Components

TQRChart

Types

Routines

To see a listing of items declared in this unit including their declarations, use the ObjectBrower.


RadiusIncrement Property

See also

Applies to

TPolarSeries component

Declaration

property RadiusIncrement : Double;

Description

RadiusIncrement is the same as accessing the Chart1.LeftAxis.Increment property when using TPolarSeries.

It determines the increment, in polar radius scales, used to draw the ring grid lines. You can find the property in the PolarSeries page of the editor

You may use RadiusIncrement with TPolarSeries.AngleIncrement to control how gridlines are displayed in Polar charts.


RadiusIncrement See also
See Also

TChart.BottomAxis.GridPen

TPolarSeries.PiePen

TChart.AngleIncrement


RadiusValues Property

See also

Applies to

TBubbleSeries component

Declaration

property RadiusValues : TChartValueList;

Description

The RadiusValues property is a TList object that stores each Bubble point Radius value. You can change Radius values by using the RadiusValues.Value[] array of doubles property:

BubbleSeries1.RadiusValues.Value[0] := 45.1 ;

This sets the first bubble point radius to 45.1

Use AddBubble and Delete methods to add and delete points.


RadiusValues property See also
See Also

TBubbleSeries.AddBubble

TChartValueList


ReCalcWidthHeight Method

See also

Applies to

TChart component

Declaration

procedure ReCalcWidthHeight;

Description

The ReCalcWidthHeight method recalculates the ChartWidth and ChartHeight variables.

You should maybe never call this method. It's called automatically by the TChart component.

This is the implementation of ReCalcWidthHeight:

procedure TChart.RecalcWidthHeight;

Begin

ChartWidth:=ChartRect.Right-ChartRect.Left;

if ChartWidth<=0 then ChartWidth:=1;

ChartHeight:=ChartRect.Bottom-ChartRect.Top;

if ChartHeight<=0 then ChartHeight:=1;

end;


ReCalcWidthHeight See also
See Also

TChart.ChartHeight

TChart.ChartWidth


ReCreateValues Method

See also

Applies to

TSurfaceSeries component

Declaration

procedure ReCreateValues;

Description

This method forces Surface Series to delete all points and create them again using the OnGetYValue event. The CreateValues method is called using the current X and Z grid dimensions.

Procedure TSurfaceSeries.ReCreateValues;

Begin

CreateValues(NumXValues,NumZValues);

end;


ReCreateValues See also
See Also

TSurfaceSeries.CreateValues


RecalcMinMax Method

Applies to

TChartValueList component

Declaration

procedure RecalcMinMax;

Description

This procedure will recalculate the Axis Minimum and Maximum values. These are the Minimum of the dependent Series Minimum values and the Maximum of the dependent Series Maximum values.


RecalcOptions Property

See also

Applies to

TChartSeries component

Declaration

property RecalcOptions : TSeriesRecalcOptions

Description

Default [ rOnDelete, rOnModify, rOnInsert, rOnClear];

Run-time and read only.The RecalcOptions set property controls the events that would force a recalculation of Series point values. This applies only to Series for which DataSource property is another Series. Each time one of this events happens, all depending Series are emptied and assigned again all of it's DataSource Series values. You can choose which events would force recalculation by using this property appropiately.

See the teedemo.dpr example project under "Moving Averages" (movinave.pas) unit.


RecalcOptions See also
See Also

TChart.CheckDatasource


RectLegend Property

See also

Applies to

TChartLegend component

Declaration

property RectLegend : TRect;

Description

Read-only and run time.

The RectLegend property returns the Legend coordinates and dimensions. It's read-only and can only be accessed at run-time. You can use RectLegend to, for example, custom draw on a chart based on Legend position coordinates or dimensions.


RectLegend property See also
See Also

TChartLegend.Alignment

TChartLegend.HorizMargin

TChartLegend.TopPos

TChartLegend.VertMargin


RedFactor Example

SurfaceSeries1.RedFactor := 2.5 ;

SurfaceSeries1.CreateDefaultPalette( SurfaceSeries1.PaletteSteps );


RedFactor Property

See also	Example

Applies to

TSurfaceSeries component

Declaration

property RedFactor : Double;

Description

Default value: 2.0

Run-time only. The RedFactor property indicates the Red color proportion to apply when creating the default Surface color Palette. You should call the Surface CreateDefaultPalette method after changing RedFactor.


RedFactor See also
See Also

TSurfaceSeries.BlueFactor

TSurfaceSeries.CreateDefaultPalette

TSurfaceSeries.GreenFactor

TSurfaceSeries.Palette

TSurfaceSeries.PaletteSteps


RefreshData Method

See also

Applies to

TDBChart component

Declaration

procedure RefreshData;

Description

The RefreshData method forces TDBChart to retrieve again all Series points from their associated DataSets.

You associate DataSets ( Tables, Queries, etc ) to Series by setting the Series DataSource property.

It calls the RefreshDataSet method for all Series with DataSets as Series DataSources.

It do not closes nor opens nor refreshes the DataSets.

It only retrieves again all records and adds all Series points. The current DataSet filter is preserved. The current record position is saved and restored after loading all point by using a TBookMark internal variable.

For each record, you can optionally use the OnProcessRecord event to stop adding more points and retrieving more records.

When refreshing datasets, the mouse cursor can be automatically to a glass cursor by using the TDBChart.ShowGlassCursor property.


RefreshData method See also
See Also

TDBChart.AutoRefresh

TDBChart.OnProcessRecord

TDBChart.RefreshDataSet

TDBChart.RefreshInterval


RefreshDataSet Method

See also

Applies to

TDBChart component

Declaration

procedure RefreshDataSet(ADataSet: TDataSet; ASeries: TChartSeries);

Description

The RefreshDataSet method will atempt to retrieve all records from the ADataSet parameter and add all points to ASeries parameter.

You associate DataSets ( Tables, Queries, etc ) to Series by setting the Series DataSource property.

This method works only with Active Series, that is, ASeries.Active must be True.

It only retrieves again all records and adds all Series points. The current DataSet filter is preserved. The current record position is saved and restored after loading all point by using a TBookMark internal variable.

For each record, you can optionally use the OnProcessRecord event to stop adding more points and retrieving more records.

When refreshing datasets, the mouse cursor can be automatically to a glass cursor by using the TDBChart.ShowGlassCursor property.


RefreshDataSet method See also
See Also

TDBChart.AutoRefresh

TDBChart.OnProcessRecord

TDBChart.RefreshData

TDBChart.RefreshInterval


RefreshInterval Property

See also

Applies to

TDBChart component

Declaration

property RefreshInterval : LongInt;

Description

Default Value: 0

The RefreshInterval property defines the number of seconds TDBChart will take to refresh all Datasets.

By default is zero, meaning no refresh will occur.

When greater than zero, TDBChart installs an internal TTimer component. Every time the timer expires TDBChart refreshes all Datasets and retrieves again all records.

The AutoRefresh property must be True for TDBChart to retrieve all record values.

This allows automatic real-time charting of database values.

It only happens at run-time.


RefreshInterval property See also
See Also

TDBChart.AutoRefresh


RefreshSeries Method

See also

Applies to

TChartSeries component

Declaration

procedure RefreshSeries;

Description

The RefreshSeries method notifies all dependent Series to recalculate their points again. Each Series has a DataSource property. When DataSource is a valid Series or DataSet component, Series get all point values from the DataSource and adds them as Series points. The RefreshSeries method forces the Series to Clear and get all points again from the DataSource component. The Refreshing process traverses the Series tree recursively.


RefreshSeries See also
See Also

TChartSeries.DataSource

TChartSeries.Clear

TChartSeries.AddY


RemoveAllSeries Method

See also

Applies to

TChart component

Declaration

procedure RemoveAllSeries;

Description

The RemoveAllSeries method removes all Series in the Chart SeriesList. The removed Series are not freed.

This is the implementation of RemoveAllSeries method:

Procedure TChart.RemoveAllSeries;

Begin

  While SeriesList.Count>0 do RemoveSeries(Series[0]);

End;


RemoveAllSeries See also
See Also

TChart.RemoveSeries

TChart.SeriesList


RemoveSeries Method

See also

Applies to

TChart component

Declaration

procedure RemoveSeries(ASeries : TChartSeries);

Description

The RemoveSeries method deletes (but not destroys) the specified ASeries parameter from the Chart list of series.

Calling this method is exactly the same as doing:

ASeries.ParentChart := nil ;


RemoveSeries method See also
See Also

TChart.ParentChart

TChart.RemoveAllSeries

TChart.SeriesList


RemovedValue Method

Applies to

TChartValueList component

Declaration

procedure RemovedValue(Const Value:Double);

Description

This procedure decrements the internal TChartValueList variables. You dont need to call directly to RemovedValue.


Repaint Method

Applies to

TChartSeries component

Declaration

procedure Repaint;

Description

This Series method forces the whole Parent Chart to Repaint. You don't normally call Repaint directly. It can be used within derived TChartSeries components when changing internally their properties.


ResizeChart Property

See also

Applies to

TChartLegend component

Declaration

property ResizeChart : Boolean

Description

Default True

The ResizeChart property indicates if Legend will automatically reduce the Chart rectangle to prevent overlap between Legend and Chart rectangles. When ResizeChart is True, the Legend.HorizMargin and Legend.VertMargin properties control the amount of pixels that Chart rectangle will be reduced.


ResizeChart See also
See Also

TChartLegend.Alignment

TChartLegend.ColorWidth

TChartLegend.HorizMargin

TChartLegend.TopPos

TChartLegend.VertMargin


RightAxis Property

See also

Applies to

TChart component

Declaration

property RightAxis : TChartAxis;

Description

The RightAxis property determines the Labels and formatting attributes of Right Chart side. It also controls where Series points will be placed.

Every TChart component has four TChartAxis: Left, Top, Right and Bottom.

The RightAxis is pre-defined to be:

Horizontal := False ;

OtherSide  := True ;

Refer to TChartAxis help topic for a complete description.


RightAxis property See also
See Also

TChart

TChart.BottomAxis

TChart.LeftAxis

TChart.TopAxis

TChartAxis


Rotate Method

See also

Applies to

TCircledSeries component

Declaration

procedure Rotate( Angle : Integer );

Description

The Rotate method adds the given Angle units to the CircledSeries.RotationAngle property. You can specify positive or negative Angle values. Positive values rotate anti-clockwise. Negative values result in clock-wise rotation. Angles must be expressed in degrees from 0 to 360.


Rotate See also
See Also

TCircledSeries.RotationAngle

TCircledSeries.XRadius

TCircledSeries.YRadius

TCircledSeries.AngleToPos

TCircledSeries.PointToAngle


RotateLabel Example

Chart1.RotateLabel ( 100, 100, 'Hello', 90 ) ;


RotateLabel Method

Example

Applies to

TChart, TDBChart components

Declaration

procedure RotateLabel ( x , y : Integer ;   Const St : String ;   RotDegree : Integer ) ;

Description

This method will draw a rotated text string at the specified xy coordinates with the RotDegree rotation angle. RotDegree values must be between 0 and 360. The string is drawn on the Chart.Canvas.

See the Windows API SetTextAlign procedure for text alignment.


RotationAngle Property

See also

Applies to

TCircledSeries, TPieSeries components

Declaration

property RotationAngle : Integer;

Description

The RotationAngle can be a valid integer number between 0 and 359. This will the angle each Pie sector will be rotated counter-clockwise.


RotationAngle See also
See Also

TCircledSeries.Rotate

TCircledSeries.XRadius

TCircledSeries.YRadius

TCircledSeries.AngleToPos

TCircledSeries.PointToAngle


RoundFirstLabel Example

Given an Axis with Minimum := 70 and Maximum := 585 :

Chart1.LeftAxis.RoundFirstLabel := True ;

Axis labels:   100 200 300 400 500

Chart1.LeftAxis.RoundFirstLabel := False ;

Axis labels:   85 185 285 385 485 585


RoundFirstLabel Property

See also	Example

Applies to

TChartAxis component

Declaration

property RoundFirstLabel : Boolean

Description

Default True

Run-time only. The RoundFirstLabel property controls if Axis labels will be automatically "rounded" to the nearest magnitude. This applies both to DateTime and non-DateTime axis values. When False, Axis labels will start at Maximum Axis value.


RoundFirstLabel See also
See Also

TChartAxis.Increment

TChartAxis.Maximum

TChartAxis.Minimum


RoundRectangle Property

Applies to

TChartShape component

Declaration

property RoundRectangle : Boolean;

Description

Default : False


SameClass Method

Applies to

TChartSeries component

Declaration

Function SameClass (tmpSeries:TChartSeries):Boolean;

Description

.


SaveToBitmap Method

See also

Applies to

TChart, TDBChart components

Declaration

procedure SaveToBitmap( Const FileName : String ) ;

Description

This method will save the current chart image to the specified File Name. You should pass a valid path and name, ending with the BMP extension.


SaveToBitmap See also
See Also

TChart.SaveToMetafileEnh

TChart.SaveToMetafile


SaveToMetaFile Example

This code creates a new WMF metafile:

Chart1.SaveToMetafile( 'c:\mychart.wmf' );


SaveToMetaFile Method

See also	Example

Applies to

TChart component

Declaration

procedure SaveToMetafile(Const FileName : String);

Description

The SaveToMetafile method creates a new WMF file and stores Chart drawing instructions on it. WMF's are created to be "placeable" and prefixed with the Aldus header. That means the image can be resized when embedded in container applications like MS Word. The Metafile format has the advantadge of being smaller than equivalent saved images in bitmap format. Disadvantages are that some Windows GDI (graphic API) calls can't be used with metafiles. Clipping points from chart bounds is not possible with metafiles.

The new EMF format (using the 32bit version) promises to be a much better format supporting more graphic instructions.


SaveToMetaFile See also
See Also

TChart.TeeCreateMetafile

TChart.SaveToMetafileEnh

TChart.SaveToBitmap


SaveToMetaFileEnh Example

This code creates a new Enhanced WMF metafile:

Chart1.SaveToMetafileEnh( 'c:\mychart.wmf' );


SaveToMetaFileEnh Method

See also	Example

Applies to

TChart component

Declaration

procedure SaveToMetafileEnh(Const FileName : String);

Description

The SaveToMetafileEnh method creates a new Enhanced WMF file and stores Chart drawing instructions on it. WMF's are created to be "placeable" and prefixed with the Aldus header. That means the image can be resized when embedded in container applications like MS Word. The Metafile format has the advantadge of being smaller than equivalent saved images in bitmap format. Disadvantages are that some Windows GDI (graphic API) calls can't be used with metafiles. EMF format (using the 32bit version) is a much better format supporting more graphic instructions than simple metafile format.


SaveToMetaFileEnh See also
See Also

TChart.TeeCreateMetafile

TChart.SaveToMetafile

TChart.SaveToBitmap


ScaleLastPage Property

See also

Applies to

TChart component

Declaration

property ScaleLastPage : Boolean

Description

Default True

The ScaleLastPage property controls how will be the last Chart page displayed. It only has effect when TChart.MaxPointsPerPage property is greater than zero. When True, the last Chart page will have the same horizontal scaling than the other pages. When False, the last Chart page scaling will be adjusted based on the number of visible points on that last page.


ScaleLastPage See also
See Also

TChart.MaxPointsPerPage

NextPage

PreviousPage


Scroll method example

This button right scrolls 3 points on a zoomed DBChart

procedure TForm1.BitBtn1Click(Sender: TObject);

begin

  DBChart1.BottomAxis.Scroll(3,False);

end;


Scroll Method (TChartAxis)
Scroll Method

See also	Example

Applies to

TChartAxis component

Declaration

procedure Scroll(Const Offset:Double; InsideLimits:Boolean);

Description

This method will "scroll" or displace the Axis Maximum and Minimum values by the Offset parameter. If you want to scroll the Axis outside Series limits, InsideLimits must be False.


Scroll Method (TChartAxis) See also
See Also

Scrolling at runtime


Scroll Method (TChartValueList)

Applies to

TChartValueList component

Declaration

procedure Scroll;

Description

This procedure will Left-Scroll the List of values. All values are scrolled one position to the lower point index. The first value is moved to be the Last value in the List.


Series Axis Dependence

By default, each Series is assigned to depend on Left and Bottom Axis. You can set which Horizontal and Vertical axis will depend on each Series. By default, all axis are set to be Automatic. That means TeeChart will calculate the Maximum and Minimum values for each axis based on which Series are set to depend on it.

For example, if you want to mix both DateTime and NON-DateTime series in the same chart, you will need to assign a different axis to the series :

Example:

LineSeries1.XValues.DateTime := True ;

LineSeries1.HorizAxis        := aBottomAxis ;

LineSeries2.XValues.DateTime := False  ;

LineSeries2.HorizAxis        := aTopAxis ;

This will scale the X Series values accordingly.

You can also do the same for the vertical axis using the Series VertAxis property:

LineSeries1.VertAxis := aLeftAxis ;

LineSeries2.VertAxis := aRightAxis ;

You can control if Chart Axis will be scaled automatically or you can set the Axis Maximum, Minimum and Increment manually.

If you allow users to Zoom or Scroll the Chart, then the Axis will be scaled or scrolled.


Series Example

The following example will set all Bar Series Style to Cilinders

for t := 0 to Chart1.SeriesCount - 1 do

if Chart1.Series[ t ] is TBarSeries then

( Chart1.Series[ t ] as TBarSeries ).BarStyle := bsCilinder ;

The following example will count all Active Series points

counter := 0 ;

for t := 0 to Chart1.SeriesCount - 1 do

counter := counter + Chart1.Series[ t ].Count ;


Series Property

Example

Applies to

TChart, TDBChart components

Declaration

property Series[Index:Longint]:TChartSeries

Description

The Series array property is the list of Series that the Chart component maintains and draws.

(Series can be Active or not).


Series Unit

The Series unit contains the declarations for the following components and for the enumerated type associated with them. When you add a component declared in this unit to a form, the unit is automatically added to the uses clause of that form's unit. The following items are declared in the this unit:

Series are truly invisible components as they dont show on the Form. At design time you can access Series components using the Object Inspector or double-clicking on the chart to access the Chart Editor.

See the TeeChart Gallery, accessible via the Chart Editor for a full visual display of Series types.

Click here to see the included TeeChart Series types.

For a list of the variables that each Series type supports see the variables list.

Components

TAreaSeries

TBarSeries

TCircledSeries

TCustomBarSeries

TCustomSeries

TFastLineSeries

THorizBarSeries

TLineSeries

TPieSeries

TPointSeries

TSeriesPointer

Types

TBarStyle

TGetBarStyleEvent

TMultiArea

TMultiBar

TSeriesClickPointerEvent

TSeriesPointerStyle

Routines

ApplyDark Method

To see a listing of items declared in this unit including their declarations, use the ObjectBrower.


SeriesColor Example

LineSeries3.SeriesColor := clBlue ;

AreaSeries1.SeriesColor := clYellow ;


SeriesColor Property

See also	Example

Applies to

TChartSeries component

Declaration

property SeriesColor : TColor

Description

Default color is clTeeColor.

The TChartSeries SeriesColor property is the default color in which the Series points will be drawn on. This property value could be any valid Delphi or Windows color. If you add points with clTeeColor color, then they will be drawn with the SeriesColor color. This property is the default Color associated to the Series.

When you place a new Series component in a Chart, TeeChart will assign a free color to this property (a Color that no other Series in the same Chart use). Some Series have the ColorEachPoint boolean property. Setting this to TRUE will force the Series to paint each point with a different color, thus without using its SeriesColor

SeriesColor is also used to paint the small rectangle in TChartLegend.


SeriesColor See also
See Also

ColorEachPoint


SeriesCount Example

for t := 0 to Chart1.SeriesCount - 1 do

Chart1.Series[ t ].SeriesColor := clRed ;


SeriesCount Method

Example

Applies to

TChart, TDBChart components

Declaration

function SeriesCount : Longint ;

Description

This is the number of Series (Active or not) a Chart has.


SeriesDown Method

Applies to

TChart, TDBChart components

Declaration

procedure SeriesDown ( ASeries : TChartSeries ) ;

Description

The SeriesUp method will "send to back" the specified ASeries. That will change the order the Series are drawn.

WARNING:

Series order is not saved to the DFM form file.


SeriesHeight3D Property

See also

Applies to

TChart component

Declaration

property SeriesHeight3D : Longint;

Description

Run-time and read only. The SeriesHeight3D property determines the default Series height when drawing in 3D mode. The Chart.View3D property should be True. SeriesHeight3D changes when resizing a Chart, when changing the number of visible Series or when changing the Chart3DPercent property.


SeriesHeight3D See also
See Also

TChart.View3D

TChart.Chart3DPercent

TChart.SeriesWidth3D

TChart.Width3D

TChart.Height3D

TChartSeries.ZOrder


SeriesList Property

See also

Applies to

TChart, TDBChart components

Declaration

property SeriesList : TChartSeriesList;

Description

Run-time only. The SeriesList property is an array property that contains a list of pointers to all Series linked to a TChart component.

You DO NOT NEED to use this property to traverse all Series and do specific things with them:

for t:= 0 to Chart1.SeriesCount -1 do

with  Chart1.Series[ t ] do

begin

  SeriesColor := clRed ;

end;

So, YOU NEED this property to, for example, change the Series ordering at run-time. This allows control of Series Z Order positioning:

Chart1.SeriesList[ 0 ] := MySeries2 ;

Chart1.SeriesList[ 1 ] := MySeries1 ;

Chart1.SeriesList[ 2 ] := MySeries3 ;

Warning: Never FREE or REMOVE SeriesList elements. Use the Series.Free to remove it or use the Series.Active property to disable it.


SeriesList property See also
See Also

TChart.Series

TChart.SerisCount

TChartSeries.Delete

TChartSeries.Active


SeriesTitleLegend Example

That will assign the first Chart Series Title to a label caption

Label1.Caption := Chart1.SeriesTitleLegend( 0, False ) ;

That will assign the first ACTIVE Chart Series Title to a label caption

Label1.Caption := Chart1.SeriesTitleLegend( 0, True ) ;


SeriesTitleLegend Method

Example

Applies to

TChart, TDBChart components

Declaration

function SeriesTitleLegend ( SeriesIndex : Longint ; ActiveOnly : Boolean ) : String ;

Description

The SeriesTitleLegend function returns the Series.Title string.


SeriesUp Method

See also

Applies to

TChart, TDBChart components

Declaration

procedure SeriesUp ( ASeries : TChartSeries ) ;

Description

The SeriesUp method will "bring to front" the specified ASeries. This will change the order in which Series are drawn.

WARNING:

Series order is not saved to the DFM form file.


SeriesUp method See also
See Also

TChartSeries.ZOrder


SeriesWidth3D Property

See also

Applies to

TChart component

Declaration

property SeriesWidth3D : Longint;

Description

Run-time and read only. The SeriesWidth3D property determines the default Series width when drawing in 3D mode. The Chart.View3D property should be True. SeriesWidth3D changes when resizing a Chart, when changing the number of visible Series or when changing the Chart3DPercent property.


SeriesWidth3D See also
See Also

TChart.Chart3DPercent

TChart.Height3D

TChart.SeriesHeight3D

TChart.View3D

TChart.Width3D

TChartSeries.ZOrder


SetBrushCanvas Example

We want to custom draw a rectangle filled with White color and a Vertical pattern Brush of Red color. The rectangle will cover all Chart screen space between Axis.

(Don't think this is useful, just an example... <g>)

Chart1.SetBrushCanvas( clRed, bsVertical, clWhite );

With Chart1.ChartRect do

Chart1.Canvas.Rectangle( Left, Top, Right, Bottom );


SetBrushCanvas Method

See also	Example

Applies to

TChart component

Declaration

procedure SetBrushCanvas(AColor: TColor; APattern: TBrushStyle; ABackColor: TColor);

Description

The SetBrushCanvas method solves an annoying problem with the Delphi standard behaviour. Delphi VCL automatically sets the Windows GDI background mode to TRANSPARENT when the Brush.Style property is set to a different Brush style than bsSolid. This means all filled Screen parts should be erased previous to apply the transparent brush. This method calls the Windows GDI API directly to set the Windows Brush mode to OPAQUE and Windows Brush Background Color to ABackColor parameter. Use this method when you want to draw non solid patterns that need to be OPAQUE (erasing existing pixels before filling).


SetBrushCanvas See also
See Also

TChart.Canvas

TChart.FontCanvas

TChart.TeeTextHeight

TChart.TeeTextWidth


SetInternalCanvas Method

Applies to

TChart, TDBChart components

Declaration

Procedure SetInternalCanvas(NewCanvas:TCanvas);

Description


SetMinMax Example

This call:

Chart1.LeftAxis.SetMinMax( 0, 100 ) ;

is equivalent to:

Chart1.LeftAxis.Automatic:= False ;

Chart1.LeftAxis.Minimum  := 0 ;

Chart1.LeftAxis.Maximum  := 100 ;


SetMinMax Method

See also	Example

Applies to

TChartAxis component

Declaration

procedure SetMinMax( Const  AMin, AMax : Double );

Description

The SetMinMax method changes the current Axis Minimum and Maximum scales. The TChartAxis.Automatic property is set to False.


SetMinMax See also
See Also

TChartAxis.Automatic

TChartAxis.Maximum

TChartAxis.Minimum


ShadowColor Property

See also

Applies to

TChartLegend component

Declaration

property ShadowColor : TColor

Description

Default clBlack

The ShadowColor property specifies the color to fill the Legend shadow effect. You can control the Shadow effect pixels size by using the Legend.ShadowSize property.


ShadowColor Property (TPieSeries)

See also

Applies to

TPieSeries component

Declaration

property ShadowColor : TColor;

Description

The ShadowColor property determines the color used to fill the PieSeries 3D zone when Shadowed3D property is True.

The ShadowColor is used to draw many vertical lines to make Pie 3D zone darker.


ShadowColor Property (TPieSeries) See also
See also

TPieSeries.Shadowed3D


ShadowColor See also
See Also

TChartLegend.ShadowSize


ShadowSize Property

See also

Applies to

TChartLegend component

Declaration

property ShadowSize : Integer

Description

Default 3

The ShadowSize property controls the amount of pixels used to draw the Legend shadow effect. Setting this property to zero hides the Legend shadow effect. You can change the shadow color by using the Legend.ShadowColor property.


ShadowSize See also
See Also

TChartLegend.ShadowColor


Shadowed3D Property

See also

Applies to

TPieSeries component

Declaration

property Shadowed3D : Boolean;

Description

Default Value: False

The Shadowed3D property determines if the 3D Pie zone will be filled with dark lines to make a dark visual effect.


Shadowed3D property See also
See Also

TPieSeries.Color3D

TPieSeries.ShadowColor


ShowCloseTick Property

See also

Applies to

TCandleSeries component

Declaration

property ShowCloseTick : Boolean

Description

Default True

The ShowCloseTick property controls if Close prices will be displayed. This property has only effect when TCandleSeries.CandleStyle is set to csCandleBar. The CandleWidth property determines the length in pixels of Open and Close ticks.


ShowCloseTick See also
See Also

TCandleSeries.ShowOpenTick

TCandleSeries.CandleStyle

TCandleSeries.CandleWidth


ShowGlassCursor Property

See also

Applies to

TDBChart component

Declaration

property ShowGlassCursor : Boolean;

Description

Default Value: True

The ShowGlassCursor property determines if TDBChart will change the current cursor shape to a glass cursor whenever records are retrieved from Tables or Queries.

This notifies the user of record retrieval activity.

For fast and small queries or tables you might want to set it to False, thus not disturbing the user.


ShowGlassCursor property See also
See Also

TDBChart.AutoRefresh

TDBChart.RefreshDataSet

TDBChart.RefreshInterval


ShowInLegend Property

Applies to

TChartSeries component

Declaration

property ShowInLegend : Boolean

Description

Default is true

The property controls whether or not the series title should display in Chart.Legend. It is only meaningful when when LegendStyle is lsSeries or lsLastValues.


ShowOpenTick Property

See also

Applies to

TCandleSeries component

Declaration

property ShowOpenTick : Boolean

Description

Default True

The ShowOpenTick property controls if Open prices will be displayed. This property has only effect when TCandleSeries.CandleStyle is set to csCandleBar. The CandleWidth property determines the length in pixels of Open and Close ticks.


ShowOpenTick See also
See Also

TCandleSeries.CandleStyle

TCandleSeries.CandleWidth

TCandleSeries.ShowCloseTick


SideMargins Property

See also

Applies to

TBarSeries and THorizBarSeries components (TCustomBarSeries)

Declaration

property SideMargins : Boolean

Description

Default True

The SideMargins property controls if first and last displayed Bar will be separated from the Chart rectangle. By default, margins are set to half the sum of all Bar Series bar widths.


SideMargins See also
See Also

TBarSeries.BarWidth

TBarSeries.CustomBarWidth

THorizBarSeries.BarHeight

THorizBarSeries.CustomBarHeight


Size3d Method

Applies to

TChart, TDBChart components

Declaration

procedure Size3d ( Var Horiz , Vert : Longint ) ;

Description

Size3d method returns in Horiz and Vert parameters the default 3d size. The 3d size depends on Chart.Chart3dPercent property.


Sort Method

See also	Example

Applies to

TChartValueList component

Declaration

procedure Sort;

Description

.


Squared Property

See also

Applies to

TBubbleSeries component

Declaration

property Squared : Boolean

Description

Default value: True

The Squared property determines how Bubble size is calculated. By default, the horizontal and vertical Bubble sizes are equal to each Bubble's radius. When Squared is False, Bubble horizontal and vertical sizes are calculated independently based on Series axis scales.


Squared See also
See Also

TBubbleSeries.RadiusValues

TSeriesPointer.HorizSize

TSeriesPointer.VertSize


Stairs Property

Applies to

TLineSeries component

Declaration

property Stairs : Boolean;

Description

This boolean property controls the LineSeries drawing.

In most normal situations, a LineSeries draws a line between each Line point. This makes the Line to appear as a "mountain" shape. However, setting Stairs to TRUE will make the Series to draw 2 Lines between each pair of points, thus giving a "stairs" appearance. This is most used in some financial Chart representations.


StartColor Property (TChartGradient)

See also

Applies to

TChartGradient component

Declaration

property StartColor : TColor;

Description

Default:  clWhite

The StartColor property is one of the two colors used to create the gradient fill. The gradient fill is composed of two colors: StartColor and EndColor.


StartColor Property (TSurfaceSeries)
StartColor Property

See also	Example

Applies to

TSurfaceSeries component

Declaration

property StartColor : TColor;

Description

Default clNavy

The StartColor property defines one of the two colors used to create the palette to fill the Surface polygons. The UseColorRange property should be True.


StartColor property (TChartGradient) See also
See also

TChartGradient.Direction

TChartGradient.EndColor

TChartGradient.Visible


StartColor property (TSurfaceSeries) Example
StartColor Example

This code will create a gradient color palette from Red to White:

SurfaceSeries1.StartColor := clRed ;

SurfaceSeries1.EndColor := clWhite ;

SurfaceSeries1.UseColorRange := True ;


StartColor property (TSurfaceSeries) See also
See Also

TSurfaceSeries.UseColorRange

TSurfaceSeries.EndColor

TSurfaceSeries.PaletteSteps


StartValues Property (TGanttSeries)

See also

Applies to

TGanttSeries component

Declaration

property StartValues : TChartValueList;

Description

The StartValues property defines the starting Gantt bar date values. The ending Gantt bar point date is stored at TGanttSeries.EndValues list property.

StartValues and EndValues can be specified both as DateTime or double values.

Both are standard TChartValueList components. That means you can access their values with same methods as you can access X or Y values.

The TGanttSeries.AddGantt and / or TGanttSeries.AddGanttColor methods must be used to add Gantt bar points.


StartValues Property (TGanttSeries) See also
See also

TGanttSeries.AddGantt

TGanttSeries.AddGanttColor

TGanttSeries.EndValues


StartXValues Example

This code modifies the X0 coordinate of first arrow point:

tmp:=ArrowSeries1.StartXValues.Value[0];

ArrowSeries1.StartXValues.Value[0]:=tmp + 123;


StartXValues Property

See also	Example

Applies to

TArrowSeries component

Declaration

property StartXValues : TChartValueList

Description

Each Arrow has (X0,Y0) and (X1,Y1) coordinates.

StartXValues property is the list of X0 values.

StartXValues.DateTime property default value is True.


StartXValues See also
See Also

TChartValueList

TArrowSeries.AddArrow

TArrowSeries.EndXValues

TArrowSeries.EndYValues

TArrowSeries.StartYValues


StartYValues Example

This code modifies the Y0 coordinate of first arrow point:

tmp:=ArrowSeries1.StartYValues.Value[0];

ArrowSeries1.StartYValues.Value[0]:=tmp + 123;


StartYValues Property

See also	Example

Applies to

TArrowSeries component

Declaration

property StartYValues : TChartValueList

Description

Each Arrow has (X0,Y0) and (X1,Y1) coordinates.

StartXValues property is the list of Y0 values.


StartYValues See also
See Also

TChartValueList

TArrowSeries.AddArrow

TArrowSeries.EndXValues

TArrowSeries.EndYValues

TArrowSeries.StartXValues


StatChar Unit

The StatChar unit contains the declarations for the following components and for the enumerated type associated with them. When you add a component declared in this unit to a form, the unit is automatically added to the uses clause of that form's unit. The following items are declared in the this unit:

Components

TAverageTeeFunction

TExpAverageFunction

TMomentumFunction

TMovingAverageFunction

TMovingTeeFunction

TRSIFunction

TTeeFunction

Types

TPeriodFunctionStyle

Routines

To see a listing of items declared in this unit including their declarations, use the ObjectBrower.


Style Property (TChartPen)

Applies to

TChartPen component

Declaration

property Style : TPenStyle;

Description

The Style property determines the style in which the pen draw lines on the canvas.

See Delphi help:  TPen.Style


Style Property (TChartShape)

Example

Applies to

TChartShape component

Declaration

property Style : TChartShapeStyle

Description

Default Value: chasHorizLine

The Style property defines how a TChartShape component appears on a Chart.

These are the possible values and their meanings:

chasRectangle	The shape is a rectangle

chasCircle	The shape is a circle

chasVertLine	The shape is a vertical line

chasHorizLine	The shape is an horizontal line

chasTriangle	The shape is a triangle

chasInvertTriangle	The shape is an inverted triangle

chasLine	The shape is a line

chasDiamond	The shape is a diamond


Style Property (TSeriesMarks)

See also

Applies to

TSeriesMarks component

Declaration

property Style : TSeriesMarksStyle;

Description

Default Value: smsLabel

The Style property defines how Series Marks are constructed. Each different Style value makes Marks to output a different text. Several options are available, but you can also use the TChartSeries.OnGetMarkText event and override the default Series Marks text.

The different Mark styles are:

smsValue

Shows the point value. It is usually the YValue, except THorizBarSeries that defaults to the XValue. The TChartSeries.ValueFormat property is used to format the resulting string.

Example: "1234"

smsPercent

Shows the percent the point value represents. The TChartSeries.PercentFormat property is used to format the percent value.

Example: "12 %"

smsLabel

Shows the associated Point Label.

Example: "Cars"

Warning:

If the point has no Label (empty label), then the point value is used. You can use TChartSeries.OnGetMarkText event to force an empty label for a particular point.

smsLabelPercent

Shows the point Label and the percent value the point represents. The TChartSeries.PercentFormat property is used to format the percent value.

Example: "Cars 12 %"

smsLabelValue

Shows the point Label and the point value. The TChartSeries.ValueFormat property is used to format the resulting string.

Example: "Cars 1234"

smsLegend

Shows whatever is shown at Chart Legend. Please refer to TChartLegend.TextStyle property for a list of possible values.

smsPercentTotal

Shows the percent the point represents toghether with the "of" word and the sum of all points absolute values. The TChartSeries.PercentFormat property is used to format the percent value.

Example: "12 % of 1234"

NOTE:

You can alter or localize to your language the "of" word by using the "PercentOf" typed constant in Teengine unit:

Example in Spanish: PercentOf := 'sobre';

Output:   "12 % sobre 1234"

smsLabelPercentTotal

Shows the point Label toghether with the resulting "smsPercentTotal" style. The TChartSeries.PercentFormat property is used to format the percent value.

Example: "Cars 12 % of 1234"

smsXValue

Shows the point XValue (same as smsValue but with X values instead of Y values).

Example: "21/6/1996"


Style Property (TSeriesPointer)

See also

Applies to

TSeriesPointer component

Declaration

property Style : TSeriesPointerStyle;

Description

Default Value: psRectangle

The Style property defines the shape used to display the Series Points.

The default psRectangle style can be optionally in 3D mode by setting the Pointer.Draw3D property to True.

The Series Pointer.Visible property should be True.


Style property (TChartShape) Example

You can change the Shape style both at design and run-time.

MyShape.Style := chasTriangle ;


Style property (TSeriesMarks) See also
See Also

TChartSeries.MarkPercent

TChartSeries.Marks

TChartSeries.OnGetMarkText

TChartSeries.PercentFormat

TChartSeries.ValueFormat


Style property (TSeriesPointer) See also
See Also

TSeriesPointer.Draw3D

TSeriesPointer.HorizSize

TSeriesPointer.VertSize


SwapValueIndex Method

See also

Applies to

TChartSeries component

Declaration

procedure SwapValueIndex( a, b : Longint );

Description

The SwapValueIndex method interchanges two Series points. The A and B parameter should be valid point indexes, from 0 to Series Count-1.

The Chart component is automatically redrawn to display the new Series points order.


SwapValueIndex method See also
See Also

TChartSeries.Count


TAddTeeFunction component Example

To set the period for TAddTeeFunction you should use the FunctionType property of TChartSeries

To define a function series by code you should first create a new series for the function. The series may be of any type.

{ Set the function using the SetFunction method}.

Series1.SetFunction(TAddTeeFunction.Create(Self));

{You may then define the period for the function - here setting it to to 5}

Series1.FunctionType.Period:=5;

To undefine (delete) a function defined for the series use

Series1.SetFunction(nil);


TAddTeeFunction Component

See also	Example

Unit

TeeFunci

Ancestor

TTeeFunction

Description

TAddTeeFunction may be added to your project by Chart Editor at design time or at runtime using code. Default period for the TAddTeeFunction when only 1 series is added to the function is 0 (One flat line representing the total of all data points of the input series). When 2 or more input series form the TAddTeeFunction series the default period is 1 axis point. Period is applicable only to the number of axis points, Period 1 = 1 axis point; period 2 = 2 axis points, etc..


TAddTeeFunction Component See also
See Also

TSubtractTeeFunction

TMultiplyTeeFunction

TDivideTeeFunction

TAverageTeeFunction

THighTeeFunction

TLowTeeFunction

FunctionType_property


TAreaSeries Component

Properties	Methods	Events

Unit

Series

Ancestor

TChartSeries

Description

The TAreaSeries component outputs all points by drawing a line between them and fills the area defined by the line and the bottom side of the Chart.

Set the ParentChart property to the desired Chart component. Use the AddY or AddXY method to manually fill area points.

Right-click the component at design-time to access the DataSource Wizard Dialog to connect the Series to another Series or to any Table or Query component.

Use the AreaBrush property to draw patterned areas.

The AreaColor property determines the background area color.

The lines dividing area points are drawn using the AreaLinesPen property.

To build stacked area charts use the MultiArea property.

The Stairs property controls how to draw the connecting lines between points. Use then the InvertedStairs property to change how are these steps drawn.

The top lines can be altered by using the LinePen property.

Please refer to TCustomSeries ancestor description for all common Series properties like Marks, Axis, Pointers and events.


TAreaSeries Methods
Methods

Key Methods

Clicked

GetOriginPos


TAreaSeries Properties
Properties

Run-time only	Key Properties

AreaBrush	LinePen

AreaColor	MultiArea

AreaLinesPen	XValues

DrawArea	YValues


TArrowSeries Component

Properties	Methods	Events

Unit

ArrowCha

Ancestor

TPointSeries

Description

The TArrowSeries component outputs all points as arrows.

Set the ParentChart property to the desired Chart component. Use the AddArrow method to manually fill area points.

Right-click the component at design-time to access the DataSource Wizard Dialog to connect the Series to another Series or to any Table or Query component.

The arrow head dimensions can be changed using the ArrowHeight and ArrowWidth properties.

Each arrow is defined by four coordinates. These values can be accessed using the StartXValues, StartYValues, EndXValues and EndYValues properties.

Arrows are always drawn in 2D mode.

Please refer to TPointSeries ancestor description for all common Series properties like Marks, Axis, Pointers and events.


TArrowSeries Methods
Methods

Key Methods

AddArrow


TArrowSeries Properties
Properties

Run-time only	Key Properties

ArrowHeight

ArrowWidth

EndXValues

EndYValues

StartXValues

StartYValues


TAverageTeeFunction component Example

To set the period for TAverageTeeFunction you should use the FunctionType property of TChartSeries

To define a function series by code you should first create a new series for the function. The series may be of any type.

{ Set the function using the SetFunction method}.

Series1.SetFunction(TAddTeeFunction.Create(Self));

{You may then define the period for the function - here setting it to to 5}

Series1.FunctionType.Period:=5;

To undefine (delete) a function defined for the series use

Series1.SetFunction(nil);

.


TAverageTeeFunction Component

See also	Properties Example

Unit

TeeFunci

Ancestor

TTeeFunction

Description

TAverageTeeFunction performs a simple or weighted average of last Period DataSource values. TAverageTeeFunction Period is the number of points we want to group to calculate their average. So, if our Series has 1000 points and we have a Period of 200, then AverageTeeFunction will have 1000/200 (that is 5) points. Each Y value will be the simple Average of a group of 200 points.


TAverageTeeFunction Component See also
See Also

TAddTeeFunction

TMultiplyTeeFunction

TDivideTeeFunction

TSubtractTeeFunction

THighTeeFunction

TLowTeeFunction

FunctionType_property


TAverageTeeFunction Properties
Properties

Run-time only	Key Properties

Weighted


TAxisLabelStyle Type

See also	Example

Unit

TeEngine

Declaration

TAxisLabelStyle = (talAuto,talNone,talValue,talMark,talText);

Description

TAxisLabelStyle defines the possible values of the TChartAxis.LabelStyle property.

You can override each axis label text by using the Chart.OnGetAxisLabel event.

Possible values for TChartAxis.LabelStyle are:

talAuto 	Choose the Style automatically.

talNone 	No label. This will trigger the event with empty strings.

talValue 	Axis labeling is based on axis Minimum and Maximum properties.

talMark 	Each Series point will have a Label using SeriesMarks style.

talText 	Each Series point will have a Label using Series.XLabels strings.


TAxisOnGetLabel Type

See also	Example

Unit

TeEngine

Declaration

TAxisOnGetLabel = procedure(Sender:TChartAxis; Series:TChartSeries; ValueIndex: LongInt; Var LabelText: String) of object;

Description

The TAxisOnGetLabel type points to a method that notifies a TChartAxis component that an event has occurred.


TAxisOnGetNextLabel Type

See also	Example

Unit

TeEngine

Declaration

TAxisOnGetNextLabel = Procedure(Sender: TChartAxis; LabelIndex: LongInt; Var LabelValue: Double; Var Stop: Boolean) of object;

Description

The TAxisOnGetNextLabel type points to a method that notifies a XXdatasetXXX component that an event has occurred. It is used by the OnGetNextAxisLabel event.


TBarSeries Component

Properties	Methods	Events

Unit

Series

Ancestor

TCustomBarSeries

Description

The TBarSeries component outputs all points as vertical bars.

Several TBarSeries can be displayed side-to-side, one behind the other, stacked or stacked 100% by using the MultiBar property.

Set the ParentChart property to the desired Chart component. Use the AddBar or AddXY methods to manually fill area points.

Right-click the component at design-time to access the DataSource Wizard Dialog to connect the Series to another Series or to any Table or Query component.

The BarBrush property determines the pattern used to fill bars, while the BarPen property is used to draw the bar edges.

Set the desired bar style ( cilynder, pyramid, etc ) by changing the BarStyle property.

Use the BarWidthPercent property to control the relative distance between bars.

You can specify an exact bar width by using the CustomBarWidth property.

The Dark3D property controls if bar sides are filled with a darker color than front bar faces.

The OffsetPercent property determines the bars horizontal displacement. This can be used to create overlayed bars with several bar series components.

Bar series leave margins both at left and right chart sides. You can turn off this default behaviour setting the SideMargins property to False.

By default, bar bottoms start at zero vertical coordinate. Set the YOrigin property to the desired starting bottom value or set the UseYOrigin to False to make bar bottoms start at minimum bars value.

The OnGetBarStyle event can be used to supply a different bar style for each Series point.

Please refer to TCustomBarSeries ancestor description for all common Series properties like Marks, Axis dependence, methods and events.


TBarSeries Methods
Methods

Key Methods

AddBar

Clicked

GetOriginPos


TBarSeries Properties
Properties

Run-time only	Key Properties

AutoMarkPosition

BarBrush	DarkColor	UseYOrigin

BarPen	DarkerColor	YOrigin

BarStyle	MultiBar

BarWidth	NormalBarColor

BarWidthPercent	OffsetPercent

CustomBarWidth	ParentChart

Dark3D	SideMargins


TBarStyle Type

See also	Example

Unit

Series

Declaration

TBarStyle = (bsRectangle,bsPyramid,bsInvPyramid,bsCilinder,bsEllipse,bsArrow);

Description

TBarlStyle defines the possible values of the TCustomBarSeries.BarStyle property.

These are the possible Bar styles:

bsArrow

bsCilinder

bsEllipse

bsInvPyramid

bsPyramid

bsRectangle


TBubbleSeries Component

Properties	Methods	Events

Unit

BubbleCh

Ancestor

TPointSeries

Description

The TBubbleSeries component outputs all points as "bubbles", each one with a different bubble radius value.

Set the ParentChart property to the desired Chart component. Use the AddBubble method to manually fill area points.

Right-click the component at design-time to access the DataSource Wizard Dialog to connect the Series to another Series or to any Table or Query component.

All radius values are stored at RadiusValues property.

The Pointer property determines all formatting attributes.

By default, the radius values are expressed in vertical axis coordinates.  Set the Squared property to False to calculate bubble heights in vertical coordinates and bubble widths in horizontal coordinates.

Please refer to TPointSeries ancestor description for all common Series properties like Marks, Axis dependence, Pointers and events.


TBubbleSeries Methods
Methods

Key Methods

AddBubble


TBubbleSeries Properties
Properties

Run-time only	Key Properties

RadiusValues

Squared


TCandleSeries Component

Properties	Methods	Events	Tasks

Unit

CandleCh

Ancestor

TOHLCSeries

Description

The TCandleSeries outputs all points as vertical rectangles crossed by a vertical line.

Each Candle point is made of four values that represent a Stock market session. These are the HighValues, LowValues, OpenValues and CloseValues.

Set the ParentChart property to the desired Chart component. Use the AddCandle method to manually fill Candle points.

The rectangles dimensions are determined by OpenValues and CloseValues properties.  The vertical line that crosses each candle point is defined by the HighValues and LowValues properties.

Candles can be drawn in two different modes. Use the CandleStyle property to choose the preferred mode:  csCandleBar or csCandleStick.

Candles with bigger Close than Open values are filled using the UpCloseColor property.  The other candles are filled using the DownCloseColor property.

You can control the candles width in pixels by using the CandleWidth property.

When drawing candles in csCandleBar mode, you can show or hide Open and Close values by using the ShowOpenTick and ShowCloseTick properties.

Please refer to TOHLCSeries ancestor description for all common Series properties like Marks, Axis dependence, methods and events.

TCandleSeries is a Financial Series type.

Each point is a "candle" representation of Open, Close, High and Low price.

When the Open price is equal to the Close price, then the color used to draw the candle is calculated as follows:

a) If Candle is the first one, then UpCloseColor is used.

b) If previous Close is higher, then DownCloseColor is used.

c) If previous Close is lower, then UpCloseColor is used.

d) If same as previous, then follow previous color.


TCandleSeries Properties
Properties

Run-time only	Key Properties

CandleStyle

CandleWidth

DownCloseColor

Pen

ShowCloseTick

ShowOpenTick

UpCloseColor


TCandleStyle Type

See also	Example

Unit

CandleCh

Declaration

TCandleStyle = (csCandleStick,csCandleBar);

Description

TCandleStyle defines the possible values of the TCandleSeries.CandleStyle property. TCandleSeries.CandleStyle property defines how a CandleSeries point will be visually displayed.

csCandleStick 	Each Candle is drawn as a Rectangle with top and bottom lines.

csCandleBar 	Each Candle is drawn as a vertical Line with small horizontal lines.

The default CandleStyle is csCandleStick.

You can switch between Candle Styles both at design and runtime:

CandleSeries1.CandleStyle := csCandleBar;


TChart Component

Properties	Methods	Events

Unit

Chart

Ancestor

TCustomChart

Description

TChart is the most important component in TeeChart library. TChart derives from TPanel and inherits all its functionality. In short, TChart is a standard Delphi TPanel component with many new capabilities specific to charting and graphing purposes.

TChart is the ParentChart component for Series.

You can create Chart components both at design and run-time modes.

Many charts can exist in a Form.

TeeChart components can be also in a DLL (Windows dynamic linking library).


TChart Events

Key Events

OnAfterDraw	OnDblClick	OnMouseUp

OnAllowScroll	OnGetAxisLabel	OnPageChange

OnClick	OnGetLegendPos	OnResize

OnClickAxis	OnGetLegendRect	OnScroll

OnClickBackground	OnGetLegendText	OnUndoZoom

OnClickLegend	OnGetNextAxisLabel	OnZoom

OnClickSeries	OnMouseDown


TChart Language Support
Language Support

See also

TEECONST.RES

Now TeeChart includes a resource file that's linked with TeeChart units. This resource file contains the internal exception strings and warning messages.

In case you want to translate it to any other language, you can use the Borland Resource Workshop editor to access and change the string contents.

If you consider a new language would be useful for other TeeChart'ers, feel free to email it to TeeChart support.


TChart Methods

Key Methods

ActiveSeriesLegend	TeeCreateMetafile	PrintRect

AddSeries	GetLabelsSeries	ReCalcWidthHeight

Assign	GetCursorPos	RemoveAllSeries

BackWallRect	GetRectangle	RemoveSeries

CalcClickedpart	GetWidthHeight	RotateLabel

CalcSize3d	IsFreeSeriesColor	SaveToBitmap

CalcSize3dWalls	IsScreenHighColor	SaveToMetafile

CanvasChanged	IsValidDataSource	SaveToMetafileEnh

ChartPrintRect	MarkText	SeriesCount

ChartRegionRect	MaxMarkWidth	SeriesDown

ChartXCenter	MaxTextWidth	SeriesTitleLegend

ChartYCenter	MaxXValue	SeriesUp

CheckDatasource	MaxYValue	SetInternalCanvas

ClipRectangle	MinXValue	Size3d

CopyToClipBoardBitmap	MinYValue	TeeCharHeight

CopyToClipBoardMetafile	NextPage	TeeTextHeight

DoRectangle	NumPages	TeeTextOut

Draw	PreviousPage	TeeTextWidth

ExchangeSeries	Print	UnClipRectangle

FontCanvas	PrintLandscape	UndoZoom

FormattedLegend	PrintOrientation	XLabelText

FormattedValueLegend	PrintPartial	ZoomRect

GetASeries	PrintPartialCanvas	ZoomPercent

GetAxisSeries	PrintPartialCanvasToScreen

GetFreeSeriesColor	PrintPortrait


TChart Properties

Run-time only	Key Properties

Canvas	Color	Printing

AllowPanning	Foot	PrintMargins

AllowZoom	Frame	PrintResolution

AnimatedZoom	Gradient	RightAxis

AnimatedZoomSteps	Height3D	ScaleLastPage

AxisVisible	LeftAxis	Series

BackColor	LeftWall	SeriesHeight3D

BackImage	Legend	SeriesList

BackImageInside	MarginBottom	SeriesWidth3D

BottomAxis	MarginLeft	Title

BottomWall	MarginRight	TopAxis

BufferedDisplay	MarginTop	View3d

CancelMouse	MaxPointsPerPage	View3dWalls

Chart3dPercent	MaxZOrder	Width3D

ChartBounds	Monochrome

ChartHeight	MonochromePrinting

ChartRect	OriginalCursor

ChartWidth	BackImage

ClipPoints	BackImageMode


TChartAxis Component

Properties	Methods	Events	Tasks

Unit

TeEngine

Description

TChartAxis is a Chart subcomponent.

Chart components have 4 TChartAxis:

LeftAxis, RightAxis, TopAxis and BottomAxis.


TChartAxis Methods
Methods

Key Methods

AdjustMaxMin	CalcYSizeValue	LabelValue

CalcLabelStyle	Clicked	LabelWidth

CalcPosPoint	Draw	MaxLabelsWidth

CalcRect	DrawHorizontalLabel	OtherSide

CalcXYIncrement	DrawVerticalLabel	Scroll

CalcXPosValue	Horizontal	SetMinMax

CalcXSizeValue	IsDateTime

CalcYPosValue	LabelHeight


TChartAxis Properties
Properties

Run-time only	Key Properties

Automatic	LabelsFont	PosAxis

AutomaticMaximum	LabelsOnAxis	PosLabels

AutomaticMinimum	LabelsSeparation	PosTitle

Axis	LabelsSize	RoundFirstLabel

AxisValuesFormat	LabelStyle	TickInnerLength

DateTimeFormat	Logarithmic	TickLength

ExactDateTime	Maximum	TickOnLabelsOnly

Grid	Minimum	Ticks

Horizontal	MinorTickCount	TicksInner

Increment	MinorTickLength	Title

Inverted	MinorTicks	TitleSize

Labels	OtherSide	Visible

LabelsAngle	ParentChart


TChartAxisTitle Component

Properties	Methods	Events	Tasks

Unit

TeEngine

Description

The Axis will use this to draw its Title.


TChartAxisTitle Properties
Properties

Run-time only	Key Properties

Angle

Caption

Font


TChartClick Type

See also	Example

Unit

Chart

Declaration

TChartClick = procedure(Sender: TCustomChart; Button: TMouseButton; Shift: TShiftState; X, Y: Integer) of object;

Description

The TChartClick type points to a method that notifies a TChart component that a click event has occurred. It is used by OnClickLegend and OnClickBackground


TChartClickAxis Type

See also	Example

Unit

Chart

Declaration

TChartClickAxis = procedure( Sender : TCustomChart; Axis : TChartAxis; Button:TMouseButton; Shift: TShiftState; X, Y: Integer) of object;

Description

The TChartClickAxis type points to a method that notifies a TChartAxis component that a click event has occurred. It is used by OnClickAxis.


TChartClickSeries Type

See also	Example

Unit

TeEngine

Declaration

TChartClickSeries = procedure(Sender: TCustomChart; Series: TChartSeries; ValueIndex: LongInt; Button: TMouseButton; Shift: TShiftState; X, Y: Integer) of object;

Description

The TChartClickSeries type points to a method that notifies a TChart component that a click event has occurred. It is used by the  OnClickSeries event.


TChartGradient Component

Properties	Methods	Events

Unit

Chart

Description

The TChartGradient component contains all properties used to draw a nice Chart background.

You can change gradient properties by using the TChart.Gradient subcomponent property.

The gradient effect is made of two colors and many middle transition colors between them.

The Visible property controls if the gradient will be displayed or not. Set the Direction property to the desired orientation. Use the StartColor and EndColor properties to change the gradient colors.

The Owner public read-only property refers to the Chart component that owns the gradient.

Warning:

TeeChart do not uses custom color palettes. That means better results can be obtained using 16k or greater video color modes.


TChartGradient Properties
Properties

Run-time only	Key Properties

Direction

EndColor

StartColor

Visible


TChartLegend Component

Properties	Methods	Events	Tasks

Unit

TeEngine

Description

TChartLegend a TChart subcomponent.

It draws a rectangle filled with the Chart Series Titles or a Series Values formatted representation. You switch this operation mode by setting the LegendStyle.

The Alignment property defines the Legend position.

Legend can be currently placed at Top, Left, Right and Bottom side of Chart.

Left and Right Legend alignments define a vertical Legend with currently one single column of items.

Top and Bottom Legend alignments define an horizontal Legend with currently one single row of items.

The Legend itself automatically reduces the number of displayed legend items based on the available charting space.

The Legend.ResizeChart property controls if Legend dimensions should be used to reduce Chart points space.

The Legend.OnGetLegendRect event provides a mechanism to supply the desired Rectangle Legend dimensions and placement.

The Legend.OnGetLegendPos event can be used to specify fixed Legend items X Y coordinates.

The Legend.HorizMargin and VertMargin properties control distance between Legend and Left and Right margins.

The Legend.TopPos property can be used in Left or Right Legend alignments to control vertical distance between Legend and Top Chart Margin.

These techniques allow almost complete Legend control.

TChartLegend is quite a big component with many available formatting and dimensioning properties.


TChartLegend Methods
Methods

Key Methods

FormattedLegend

FormattedValue

GetColorRect

MaxLegendWidth

TotalLegendItems


TChartLegend Properties
Properties

Run-time only	Key Properties

Alignment	Frame	ResizeChart

Color	HorizMargin	ShadowColor

ColorWidth	Inverted	ShadowSize

DividingLines	LegendStyle	TextStyle

FirstValue	ParentChart	TopPos

Font	RectLegend	Visible


TChartListOrder Type

See also	Example

Unit

Declaration

TChartListOrder =( loNone, loAscending, loDescending );

Description

TChartListOrder defines the possible values of the TChartValueList.Order property.


TChartPen Component

Properties	Methods	Events	Tasks

Unit

TeEngine

Description

TChartPen is an inherited TPen persistent object. Many TeeChart properties are TChartPen properties. For example, the TChartLegend.Frame property is a TChartPen. The Legend draws a frame around it with this Pen settings, but, ONLY when the Visible property is TRUE. Please refer to Delphi TPen help page for more details about TPen objects.


TChartPen Properties
Properties

Run-time only	Key Properties

Color

Mode

Style

Visible

Width


TChartSeries Component

Properties	Methods	Events	Tasks

Unit

TeEngine

Description

TChartSeries is the ancestor of every chart series type.

Click here to see the included TeeChart Series types.


TChartSeries Events
Events

Key Events

AfterDrawValues

BeforeDrawValues

OnAfterAdd

OnBeforeAdd

OnClearValues

OnClick

OnGetMarkText


TChartSeries Methods
Methods

Key Methods

AddValue	Delete	MaxXValue

AddXY	DoSeriesClick	MaxYValue

AddY	DrawValuesForward	MinXValue

AssignValues	FillSampleValues	MinYValue

CalcXPos	GetCursorValueIndex	NumSampleValues

CalcXPosValue	GetCursorValues	PointOrigin

CalcXSizeValue	GetEditorClass	RefreshSeries

CalcYPos	GetHorizAxis	Repaint

CalcYPosValue	GetMarkValue	SameClass

CalcYSizeValue	GetVertAxis	SwapValueIndex

CalcZOrder	GetYValueList	ValuesListCount

CheckDataSource	IsValidSeriesSource	VisibleCount

Clear	IsValidSourceOf	XScreenToValue

Clicked	MandatoryValueList	XValueToText

ColorRange	MarkPercent	YScreenToValue

Count	MaxMarkWidth	YValueToText


TChartSeries Properties
Properties

Run-time only	Key Properties

Active	LinkedSeries	VertAxis

AllowSinglePoint	Marks	XLabel

ColorEachPoint	ParentChart	XLabelsSource

ColorSource	PercentFormat	XValue

Cursor	RecalcOptions	XValues

DataSource	SeriesColor	YValue

Datasources	ShowInlegend	YValues

DesignMaxPoints	Title	ZOrder

FirstValueIndex	ValueColor

FunctionType	ValueFormat

HorizAxis	ValueList

LastValueIndex	ValueMarkText


TChartSeriesList Component

Properties	Methods	Events	Tasks

Unit

TeEngine

Ancestor

TList

Description

TChartSeriesList is a non-visible component. Maintains a list of series included in TChart. You can double-click the Chart.Series property to access to an editor dialog.

Using the Chart.Series property is like using a standard array. You can refer to a specific series by number: (Index starts at zero)

Chart1.Series[3].Title:='Boston Sales';

That can be useful when you do not have access to a TChartSeries or when you are doing generic code:

Example:

for t:=0 to Chart1.SeriesCount-1 do

if Chart1.Series[t] is TLineSeries then

(Chart1.Series[t] as TLineSeries).LinePen.Width:=3;


TChartShape Component

Properties	Methods	Events	Tasks

Unit

TeeShape

Ancestor

TChartSeries

Description

The TChartShape component is a special Series component. It allows the developer to place shapes inside Chart bounds.  It works very similar to Delphi standard TShape component.

Set the ParentChart property to the desired Chart component.

Then, set the X0, Y0 and X1, Y1 properties to the desired point coordinates. The X0, Y0, X1 and Y1 properties must be expressed in axis scales.

The default Shape style is an horizontal line. Choose the desired style (Rectangle, Ellipse, etc) by using the Style property.

The Brush and Pen properties determine the shape color and frame attributes.

The Clicked method can be used to check if mouse cursor is over shape boundaries.

Shapes can be zoomed and scrolled as with any other Series type.

Please refer to TChartSeries ancestor description for all common Series properties like Marks, Axis dependence, methods and events.


TChartShape Methods
Methods

Key Methods

GetShapeRect


TChartShape Properties
Properties

Run-time only	Key Properties

Alignment

Brush

Font

Pen

RoundRectangle

Style

Text

Transparent

X0

X1

XYStyle

Y0

Y1


TChartShapeStyle Type

See also	Example

Unit

TeeShape

Declaration

TChartShapeStyle = (chasRectangle, chasCircle, chasVertLine, chasHorizLine, chasTriangle, chasInvertTriangle, chasLine, chasDiamond);

Description

TChartShapeStyle defines the list of possible values for the TChartShape.Style property.

chasRectangle	The shape is a rectangle

chasCircle	The shape is a circle

chasVertLine	The shape is a vertical line

chasHorizLine	The shape is an horizontal line

chasTriangle	The shape is a triangle

chasInvertTriangle	The shape is an inverted triangle

chasLine	The shape is a line

chasDiamond	The shape is a diamond


TChartSurfaceGetColor Type

See also	Example

Unit

TeeSurfa

Declaration

TChartSurfaceGetColor = function(Sender:TChartSeries; ValueIndex:Longint):TColor;

Description

The TChartSurfaceGetColor type points to a method that notifies a TChartSeries component that an event has occurred. It is used by  the OnGetColor Event


TChartSurfaceGetY Type

See also	Example

Unit

TeeSurfa

Declaration

TChartSurfaceGetY = function(Sender:TChartSeries; X,Z:Longint) : Double;

Description

The TChartSurfaceGetY type points to a method that notifies a TChartSeries component that an event has occurred. It is used by the OnGetYValue Event.


TChartTitle Component

Properties	Methods 	Events	Tasks

Unit

Chart

Description

The TChartTitle component is used to display Chart Title and Foot text strings at top and bottom Chart sides respectively. The Text property contains the text to be displayed. This property is of type TStrings which means that it is a series of strings in a list. Whenever you change the Text property you should repaint the Chart component manually. It's not done automatically.

Example:

With Chart1.Title.Text do

begin

Clear;

Add('ACME Monthly Sales');

Add('Year: 1997');

end;

Chart1.Repaint;

Set the Visible property to True to show the Title or Foot contents. Change the text appearance using the Font property. You can draw a frame around text by setting the Frame pen properties. The frame background color and pattern is defined by the Brush property. The AdjustFrame boolean property controls if title frame will be drawn around title text or using the whole Chart width. Title text can be aligned using the Alignment property.

The ParentChart public read-only property refers to the Chart component that owns the title.


TChartTitle Methods
Methods

Key Methods

Clicked


TChartTitle Properties
Properties

Run-time only	Key Properties

AdjustFrame

Alignment

Brush

Font

Frame

ParentChart

Text

TitleRect

Visible


TChartValueList Component

Properties	Methods	Events	Tasks

Unit

TeEngine

Description

The TChartValueList component is the container of point values.

Each Series component has one or more values lists.

The XValues and YValues properties are TChartValueList components.

Some other Series components have more values lists. For example, BubbleSeries component has another value list: RadiusValues.


TChartValueList Methods
Methods

Key Methods

AddChartValue	Last

ClearList	Locate

ClearValues	ModifyValue

Count	RecalcMinMax

Delete	RemovedValue

First	Scroll

InsertChartValue	sort


TChartValueList Properties
Properties

Run-time only	Key Properties

DateTime	TempValue

Multiplier	TotalABS

Name	Total

Order	Value

Owner	ValueSource


TChartWall Component

Properties	Methods	Events	Tasks

Unit

Chart

Description

The TChartWall component controls how to display the Chart left and bottom walls.

It is used by the TChart.LeftWall and TChart.BottomWall properties.

The Size property determines the walls dimensions. The Color and Brush properties are used to fill walls, and the Pen property controls the walls frame.

Setting the Color property to "clTeeColor" means walls will not be filled so they will look transparent.

The ParentChart public read-only property refers to the Chart component that owns the wall.


TChartWall Properties
Properties

Run-time only	Key Properties

Brush

Color

ParentChart

Pen


TCircledSeries Component

Properties	Methods	Events

Unit

Series

Ancestor

TChartSeries

Description

The TCircledSeries component is an abstract component used as the ancestor of TPieSeries and TPolarSeries components.

Set the ParentChart property to the desired Chart component.

To add points to the Series you should use the TPieSeries.AddPie or TPolarSeries.AddPolar methods.

Right-click the component at design-time to access the DataSource Wizard Dialog to connect the Series to another Series or to any Table or Query component.

The Circled property determines if the Series will draw as a circle or ellipse.

Change the circle background color using the CircleBackColor property.

The RotationAngle property determines the offset angle used to calculate points positions.

Use the PiePen property to change the circle lines format.

You can define exact circle dimensions by setting the CustomXRadius and CustomYRadius properties.

The Rotate method can be used to change the RotationAngle property at run-time.

The XRadius and YRadius read-only properties return the current circle half-width and half-height in pixels.

The CircleRect read-only property returns the circle bounding rectangle in pixels.

The CircleWidth and CircleHeight read-only properties return the circle width and height in pixels.

The CircleXCenter and CircleYCenter read-only properties return the circle center coordinates in pixels.

When Chart.View3D property is True, the Offset3D read-only property returns the amount in pixels of the circle 3D effect.

To convert from polar values to screen pixel coordinates you can use the AngleToPos function.

The PointToAngle function does the opposite, it returns the corresponding angle given some XY screen pixel coordinates.

Please refer to TChartSeries ancestor description for all common Series properties like Marks, Axis dependence and events.


TCircledSeries Methods
Methods

Key Methods

AngleToPos

Rotate


TCircledSeries Properties
Properties

Run-time only	Key Properties

Circled	PiePen

CircleXCenter	RotationAngle

CircleYCenter	XRadius

CustomXRadius	YRadius

CustomYRadius


TCurveFittingFunction Component

Properties	Methods	Events	Tasks

Unit

CurvFitt

Ancestor

TTeeFunction

Description

TCurveFittingFunction only applies to TeeChart Pro

TCurveFittingFunction constructs a polynomial line based on its DataSource Series values.


TCurveFittingFunction Properties
Properties

Run-time only	Key Properties

AnswerVector

FirstPoint

LastPoint

PolyDegree

TypeFitting


TCustomBarSeries Component

Properties	Methods	Events	Tasks

Unit

Series

Ancestor

TChartSeries

Description

The TCustomBarSeries component is an abstract component used as the ancestor of TBarSeries and THorizBarSeries components.

Set the ParentChart property to the desired Chart component.

To add points to the Series you should use the TBarSeries.AddBar or THorizBarSeries.AddBar methods.

Right-click the component at design-time to access the DataSource Wizard Dialog to connect the Series to another Series or to any Table or Query component.

TCustomBarSeries provides several methods and read-only properties shared by both TBarSeries and THorizBarSeries:

The NormalBarColor,DarkColor and DarkerColor read-only properties return the colors used to fill bar sides and top covers. The CalcBarColors method calculates the above color properties for each bar point.

The DrawBar method is used to display each bar point.

The BarRectangle, BarPolygon and BarEllipse methods can be used to custom draw bar shapes.

The GetBarStyle function returns the corresponding BarStyle for a given bar point.

The BarMargin function returns the amount in pixels used to leave margins from Chart edges.

The ApplyBarOffset function returns a given bar screen coordinate after applying the OffsetPercent property.

Please refer to TChartSeries ancestor description for all common Series properties like Marks, Axis dependence and events.


TCustomBarSeries Events
Events

Key Events

OnGetBarStyle


TCustomBarSeries Methods
Methods

Key Methods

ApplyBarOffset

BarMargin

Clicked

GetBarStyle


TCustomBarSeries Properties
Properties

Run-time only	Key Properties

BarBrush	MultiBar

BarPen	NormalBarColor

BarStyle	OffsetPercent

BarWidthPercent	SideMargins

Dark3D	UseYOrigin

DarkColor	YOrigin

DarkerColor


TCustomSeries Component

Properties	Methods	Events	Tasks

Unit

TCustomSeries is an abstract class derived from TChartSeries.

Its the common ancestor for TLineSeries, TAreaSeries and the TPointSeries.


TCustomSeries Component Events
Events

Key Events

OnClick


TCustomSeries Component Properties
Properties

Run-time only	Key Properties

AreaBrush	LinePen

AreaColor	Pointer

AreaLinesPen	SeriesColor

DrawArea	Stairs

HorizAxis	VertAxis

LineBrush


TDBChart Component

Properties	Methods	Events	Tasks

Unit

DBChart

Ancestor

TChart

Description

TDBChart derives from TChart and inherits all its functionality. When a Chart Series is connected to a TDBChart component, TDBChart looks in the Series DataSource property.

If DataSource is a TTable, TQuery, TClientDataset or any valid Delphi DataSet component, TDBChart will automatically retrieve its records preserving all Filters and Ranges. You can also filter which records would be inserted by using the Series OnBeforeAdd event.

TDBChart also accepts Chart Series which are connected to another Chart Series and also Chart Series whose points are being manually added by coding.

The main difference between TChart and TDBChart is that the last one NEEDS the Borland Database Engine to be correctly installed in the target machine, while TChart does not.

The above would be useful in case your application do not need Tables, Querys or any standard Delphi database components.

Changing from a TChart to a TDBChart or vice versa can be done both at design and runtime by changing the Series ParentChart and the Series Values ValueSource properties.


TDBChart Events
Events

Key Events

OnProcessRecord


TDBChart Methods
Methods

Key Methods

CheckDatasource

IsValidDataSource

RefreshData

RefreshDataSet


TDBChart Properties
Properties

Run-time only	Key Properties

AutoRefresh

RefreshInterval

ShowGlassCursor


TDateTimeStep Type

See also	Example

Unit

TeEngine

Declaration

TDateTimeStep = (dtOneSecond, dtFiveSeconds, dtTenSeconds, dtFifteenSeconds, dtThirtySeconds, dtOneMinute, dtFiveMinutes, dtTenMinutes, dtFifteenMinutes, dtThirtyMinutes, dtOneHour, dtTwoHours, dtSixHours, dtTwelveHours, dtOneDay, dtTwoDays, dtThreeDays, dtOneWeek, dtHalfMonth, dtOneMonth, dtTwoMonths, dtSixMonths, dtOneYear);

Description

TDateTimeStep is a set of constants used to specify a date time increment.

Example:

Chart1.BottomAxis.Increment := DateTimeStep[ dtTwoDays ];

This array is initialized internally at CHART.DCU unit.

Example:

DateTimeStep[ dtFifteenMinutes ] := EncodeTime( 0, 15, 0) ;

DateTimeStep[ dtThreeDays ] := 3 ;


TDivideTeeFunction component Example

To set the period for TDivideTeeFunction you should use the FunctionType property of TChartSeries

To define a function series by code you should first create a new series for the function. The series may be of any type.

{ Set the function using the SetFunction method}.

Series1.SetFunction(TAddTeeFunction.Create(Self));

{You may then define the period for the function - here setting it to to 5}

Series1.FunctionType.Period:=5;

To undefine (delete) a function defined for the series use

Series1.SetFunction(nil);


TDivideTeeFunction Component

See also	Example

Unit

TeeFunci

Ancestor

TTeeFunction

Description

TDivideTeeFunction may be added to your project by Chart Editor at design time or at runtime using code. Default period for TDivideTeeFunction is 1 (By default, divide will show the division of all series at each axis point). Period is applicable only to the number of axis points, Period 1 = 1 axis point; period 2 = 2 axis points, etc..

TDivideTeeFunction will work with any number of input series as datasource. The Datasource is best defined using the Chart Editor.


TDivideTeeFunction Component See also
See Also

TAddTeeFunction

TMultiplyTeeFunction

TSubtractTeeFunction

TAverageTeeFunction

THighTeeFunction

TLowTeeFunction

FunctionType_property


TeeCreateMetafile Example

You should always delete the returned Metafile handle after using it:

Var h : HMetafile ;

h := Chart1.TeeCreateMetafile ;

try

....

finally

DeleteObject( h );

end;


TeeCreateMetafile Method

See also	Example

Applies to

TChart component

Declaration

function TeeCreateMetafile : HMETAFILE;

Description

The TeeCreateMetafile function returns a new Metafile handle. Metafiles are vector graphic formats. See the Windows API regarding Metafile details. You should always delete the returned Metafile handle after using it:


TeeCreateMetafile See also
See Also

TChart.SaveToMetafile


TeeFunci Unit

The TeeFunci unit contains the declarations for the following components and for the enumerated type associated with them. The following items are declared in the this unit:

Components

TAddTeeFunction

TSubractTeeFunction

TMultiplyTeeFunction

TDivideTeeFunction

TAverageTeeFunction

THighTeeFunction

TLowTeeFunction

Types

TPeriodFunctionStyle only applies to TeeChart Pro

TPeriodFunctionStyle

Routines

To see a listing of items declared in this unit including their declarations, use the ObjectBrower.


 TErrorBarSeries Component

Properties	Methods	Events

Unit

ErrorBar

Ancestor

TBarSeries

Description

The TErrorBarSeries component is a standard TBarSeries component that adds a new value for each bar.

This new values are stored at ErrorValues property.

They are used to draw a "T" shape on top of each bar.

Set the ParentChart property to the desired Chart component.

To add points to the Series you should use the AddErrorBar method.

Right-click the component at design-time to access the DataSource Wizard Dialog to connect the Series to another Series or to any Table or Query component.

The ErrorWidth property determines the width of the "T" shape.It can be expressed in screen pixels or in relative bar width percent depending on the ErrorWidthUnits property.

The ErrorPen property determines the kind of pen used to draw the "T" shape.

Negative ErrorValues are allowed. They are drawn as an inverted "T" shape.

Please refer to TBarSeries ancestor description for all common properties like BarPen, BarBrush, BarStyle and basic properties like Marks, Axis dependence and events.


TErrorBarSeries Methods
Methods

Key Methods

AddErrorBar


TErrorBarSeries Properties
Properties

Run-time only	Key Properties

ErrorPen

ErrorValue

ErrorValues

ErrorWidth

ErrorWidthUnits


TErrorWidthUnits Type
ErrorWidthUnits Type

See also	Example

Unit

ErrorBar

Declaration

TErrorWidthUnits = ( ewuPercent, ewuPixels );

Description

TErrorWidthUnits defines the possible values of the ErrorWidthUnits property.


 TExpAverageFunction Component

Properties	Methods	Events	Tasks

Unit

StatChar

Ancestor

TTeeFunction

Description

TExpAverageFunction only applies to TeeChart Pro

TExpAverageFunction does an Exponential average based on its DataSource values.

The used formula is:

ExpAverage ( point ) := ExpAverage ( previous point ) * ( 1 - Weight ) + Weight * PointValue


TExpAverageFunction Properties
Properties

Run-time only	Key Properties

Weight


TFastLineSeries Component

Properties	Methods	Events

Unit

Series

Ancestor

TChartSeries

Description

The TFastLineSeries component is an extremely simple Series component that draws its points as fast as possible.

It can be used in cases where speed is the most important needed feature. TFastLineSeries has no clicking support and no Marks.

Set the ParentChart property to the desired Chart component.

To add points to the Series use the standard AddY or AddXY methods.

Right-click the component at design-time to access the DataSource Wizard Dialog to connect the Series to another Series or to any Table or Query component.

The only extra property is the LinePen property, which controls the line appearance.

Please refer to TChartSeries ancestor description for all common Series properties like Axis dependence and events.


TFastLineSeries Properties
Properties

Run-time only	Key Properties

HorizAxis

LinePen

SeriesColor

VertAxis

XValues

YValues


TGanttSeries Component

Properties	Methods	Events	Tasks

Unit

GanttCh

Ancestor

TPointSeries

Description

The TGanttSeries outputs all points as horizontal bars with different starting and ending horizontal coordinates and different vertical

positions.

It can be used to display a sequence of temporal tasks, sorted over time along the horizontal axis.

Set the ParentChart property to the desired Chart component. Use the AddGantt or AddGanttColor methods to manually fill gantt bar points.

Each gantt bar has an start and end values. These values can be Delphi TDateTime or Double types.

The StartValues property stores all starting values for all Gantt bars. The EndValues property stores all ending values for all Gantt bars.

You can connect gantt bars by using the NextTask property.

Example:

Var tmp1,tmp2 : Longint;

{ Clear all Series Gantt bars }

GanttSeries1.Clear;

{ Add a first Gantt bar }

tmp1 := GanttSeries1.AddGantt( EncodeDate( 1996, 1,1 ),

                               EncodeDate( 1996, 1,31 ),

                               0,

                               'Programming' );

{ Add a second Gantt bar }

tmp2 := GanttSeries1.AddGantt( EncodeDate( 1996, 3,1 ),

                               EncodeDate( 1996, 3,31 ),

                               1,

                               'Testing' );

{ Connect the first bar to the second bar }

GanttSeries1.NextTask[ tmp1 ]:= tmp2 ;

The ConnectingLinePen property determines the pen used to draw the connecting lines between gantt bar points.

The Pointer.VertSize property specifies the gantt bars height.

Please refer to TPointSeries ancestor description for all common Series properties like Pointer, Marks, Axis dependence, methods and events.


TGanttSeries Methods
Methods

Key Methods

AddGantt


TGanttSeries Properties
Properties

Run-time only	Key Properties

ConnectingPen

EndValues

StartValues

NextTask


TGetBarStyleEvent Type

See also	Example

Unit

Series

Declaration

TGetBarStyleEvent = procedure( Sender : TCustomBarSeries; ValueIndex : Longint; Var TheBarStyle : TBarStyle )

Description

The TGetBarStyleEvent type points to a method that notifies a TCustomBarSeries component that an event has occurred. It is used by the OnGetBarStyle Event.


TGradientDirection Type

See also	Example

Unit

Chart

Declaration

TGradientDirection = ( gdTopBottom, gdBottomTop, gdLeftRight, gdRightLeft );

Description

TGradientDirection defines the possible values of the TChartGradient.Direction property.


THighTeeFunction component Example

To set the period for THighTeeFunction you should use the FunctionType property of TChartSeries

To define a function series by code you should first create a new series for the function. The series may be of any type.

{ Set the function using the SetFunction method}.

Series1.SetFunction(TAddTeeFunction.Create(Self));

{You may then define the period for the function - here setting it to to 5}

Series1.FunctionType.Period:=5;

To undefine (delete) a function defined for the series use

Series1.SetFunction(nil);


THighTeeFunction Component

See also	Example

Unit

TeeFunci

Ancestor

TTeeFunction

Description

THighTeeFunction may be added to your project by Chart Editor at design time or at runtime using code. Default period for THighTeeFunction is 0 (By default, THighTeeFunction will show the highest point of all the series points). Period is applicable to the number of axis points, Period 1 = 1 axis point; period 2 = 2 axis points, etc..

If more than 1 data series is added as datasource for THighTeeFunction then the period default changes to 1.

THighTeeFunction will work with any number of input series as datasource. The Datasource is best defined using the Chart Editor.


THighTeeFunction Component See also
See Also

TAddTeeFunction

TMultiplyTeeFunction

TDivideTeeFunction

TAverageTeeFunction

TSubtractTeeFunction

TLowTeeFunction

FunctionType_property


THorizAxis Type

See also	Example

Unit

TeEngine

Declaration

THorizAxis = (aTopAxis,aBottomAxis);

Description

THorizAxis defines the possible values of the TChartSeries.HorizAxis property. Most Series components have Horizontal and Vertical dependent axis. You can choose a given Series to have the Horizontal Axis at Top or Bottom.

Default value: aBottomAxis

You can set the HorizAxis property both at design and runtime:

LineSeries1.HorizAxis := aTopAxis ;


THorizBarSeries Component

Properties	Methods	Events

Unit

Series

Ancestor

TCustomBarSeries

Description

The THorizBarSeries component outputs all points as horizontal bars.

Several THorizBarSeries can be displayed side-to-side, one behind the other, stacked or stacked 100% by using the MultiBar property.

Set the ParentChart property to the desired Chart component. Use the AddBar or AddXY methods to manually fill area points.

Right-click the component at design-time to access the DataSource Wizard Dialog to connect the Series to another Series or to any Table or Query component.

Warning:

The most important concept in THorizBarSeries is that point values are INVERTED. That means Y values are the bar order position while X values are the bars values.

The AddBar method does the conversion automatically and is the recommended method to add points. When using the AddXY method you should calculate the correct Y position.

Example:

{ This code adds 10 horizontal bars.

  The loop counter is used as the Y bar value (the bar order) }

for t:= 1 to 10 do

HorizBarSeries1.AddXY( MyValues[t], t, MyLabels[t], MyColor[t] );

The BarBrush property determines the pattern used to fill bars, while the BarPen property is used to draw the bar edges.

Set the desired bar style ( cilynder, pyramid, etc ) by changing the BarStyle property.

Use the BarWidthPercent property to control the relative distance between bars. You can specify an exact bar height by using the CustomBarHeight property.

The Dark3D property controls if bar sides are filled with a darker color than front bar faces.

The OffsetPercent property determines the bars vertical displacement. This can be used to create overlayed bars with several bar series components.

Bar series leave margins both at top and bottom Chart sides. You can turn off this default behaviour setting the SideMargins property to False.

By default, bar left positions start at zero horizontal coordinate. Set the YOrigin property to the desired starting left value or set the UseYOrigin to False to make bar left sides start at minimum bars value.

The OnGetBarStyle event can be used to supply a different bar style for each Series point.

Please refer to TCustomBarSeries ancestor description for all common Series properties like Marks, Axis dependence, methods and events.


THorizBarSeries Methods
Methods

Key Methods

AddBar

Clicked

GetOriginPos


THorizBarSeries Properties
Properties

Run-time only	Key Properties

BarHeight

CustomBarHeight


TLegendAlignment Type

See also	Example

Unit

TeEngine

Declaration

TLegendAlignment = (laLeft,laRight,laTop,laBottom);

Description

TLegendAlignment defines the possible values of the TChartLegend.Alignment property.


TLegendStyle Type

See also	Example

Unit

TeEngine

Declaration

TLegendStyle = (lsAuto,lsSeries,lsValues,lsLastValues);

Description

TLegendStyle defines the possible values of the TChartLegend.LegendStyle property.

The Chart Legend can draw either the Chart Series Titles or the first Series Values.

This feature is controlled through this property:

lsAuto 	TChartLegend draws Series Titles if there's more than one TChartSeries in the TChart

lsSeries 	TChartLegend draws the Series Titles (also if there's only one TChartSeries in the chart.

lsValues 	TChartLegend draws the first Active TChartSeries values.

lsLastValues 	TChartLegend draws the Last Value of each Active TChartSeries (similar to lsSeries).


TLegendTextStyle Type

See also	Example

Unit

TeEngine

Declaration

TLegendTextStyle = (ltsPlain,ltsLeftValue,ltsRightValue,ltsLeftPercent,ltsRightPercent,ltsXValue);

Description

TLegendTextStyle defines the possible values of the TChartLegend.TextStyle property.

Several formatting options can be selected when TChartLegend draws the TChartSeries values: You can also delegate the Legend string construction by using the OnGetLegendText Chart event.

ltsPlain	Summer

ltsLeftValue	1234 Summer

ltsRightValue	Summer 1234

ltsLeftPercent	5.1 % Summer

ltsRightPercent	Summer 5.1 %

ltsXValue	4321 (Applies only to Series with X values. See TChartSeries.AddXY method.)


TLineSeries Component

Properties	Methods	Events

Unit

Series

Ancestor

TCustomSeries

Description

The TLineSeries component outputs all points by drawing a line between them.

Set the ParentChart property to the desired Chart component. Use the AddY or AddXY method to manually fill line points.

Right-click the component at design-time to access the DataSource Wizard Dialog to connect the Series to another Series or to any Table or Query component.

TLineSeries derives from TCustomSeries, which adds support for Series Pointers, Marks and click events.

The LinePen property determines the kind of pen used to draw the lines between points.

Use the LineBrush in 3D mode to change the line fill pattern.

The Stairs property controls how to draw the connecting lines between points. Use then the InvertedStairs property to change how are these steps drawn.

You can show point shapes by using the Pointer subcomponent property.

Please refer to TCustomSeries ancestor description for all common Series properties like Marks, Axis dependence, methods and events.


TLineSeries Events
Events

Key Events

OnClick


TLineSeries Methods
Methods

Key Methods

Clicked


TLineSeries Properties
Properties

Run-time only	Key Properties

LineBrush

LinePen

Stairs

XValues

YValues


TLowTeeFunction component Example

To set the period for TLowTeeFunction you should use the FunctionType property of TChartSeries

To define a function series by code you should first create a new series for the function. The series may be of any type.

{ Set the function using the SetFunction method}.

Series1.SetFunction(TAddTeeFunction.Create(Self));

{You may then define the period for the function - here setting it to to 5}

Series1.FunctionType.Period:=5;

To undefine (delete) a function defined for the series use

Series1.SetFunction(nil);


TLowTeeFunction Component

See also	Example

Unit

TeeFunci

Ancestor

TTeeFunction

Description

TLowTeeFunction may be added to your project by Chart Editor at design time or at runtime using code. Default period for TLowTeeFunction is 0 (By default, TLowTeeFunction will show the lowest point of all the series points). Period is applicable to the number of axis points, Period 1 = 1 axis point; period 2 = 2 axis points, etc..

If more than 1 data series is added as datasource for TLowTeeFunction then the period default changes to 1.

TLowTeeFunction will work with any number of input series as datasource. The Datasource is best defined using the Chart Editor.


TLowTeeFunction Component See also
See Also

TAddTeeFunction

TMultiplyTeeFunction

TDivideTeeFunction

TAverageTeeFunction

THighTeeFunction

TSubtractTeeFunction

FunctionType_property


TMomentumFunction Component

Properties	Methods	Events	Tasks

Unit

StatChar

Ancestor

TMovingTeeFunction

Description

TMomentumFunction only applies to TeeChart Pro

TMomentumFunction is a descendant of TMovingTeeFunction. Each Y value is the current point's Y value less the last Period point's Y value.

Example:

We have the following Y values: 4 6 2 8 5 1 0 3 6

The TMomentumFunction calculated points (with a Period of 4) are: (5-4) (1-6) (0-2) (3-8) (6-5)

That is: 1 -5 -2 -5 1

These are the Y values of TMomentumFunction. As new points are being appended, TMomentumFunction calculates new points.


TMovingAverageFunction Component

Properties	Methods	Events	Tasks

Unit

StatChar

Ancestor

TMovingTeeFunction

Description

TMovingAverageFunction only applies to TeeChart Pro

TMovingAverageFunction is a descendant of TMovingTeeFunction. It does an average calculation of last Period point values.

Calculation: TMovingAverageFunction will calculate the simple or weighted average of every group of Period points.

Example:

We have a Series with the following Y values: 4 8 2 6 7 2 1

And we want to plot a simple Moving Average of Period: 3

That is: (4+8+2)/3  (8+2+6)/3  (2+6+7)/3  (6+7+2)/3  (7+2+1)/3

Then: 14/3  16/3  15/3  15/3  10/3

New appended points will trigger new MovingAverage points. Changing the Period property (both at design and runtime) will recalculate entirely the MovingAverage.


TMovingAverageFunction Properties
Properties

Run-time only	Key Properties

Centered

Weighted


TMovingTeeFunction Component

Properties	Methods	Events	Tasks

Unit

StatChar

Ancestor

TTeeFunction

Description

TMovingTeeFunction only applies to TeeChart Pro

TMovingTeeFunction is an abstract Series type.

Given a Period, TMovingTeeFunction will trigger a calculation request at every new added point. In the calculation overrided method, the derived component needs to calculate the Y value.

TMovingAverageFunction derives from it.


TMultiArea Type

See also	Example

Unit

Series

Declaration

TMultiArea = ( maNone, maStacked, maStacked100 );

Description

TMultiArea defines the possible values of the MultiArea property.


TMultiBar Type

See also	Example

Unit

Series

Declaration

TMultiBar = (mbNone, mbSide, mbStacked, mbStacked100);

Description

TMultiBar defines the possible values of the TCustomBarSeries.MultiBar property.


TMultiplyTeeFunction Component See also
See Also

TAddTeeFunction

TSubtractTeeFunction

TDivideTeeFunction

TAverageTeeFunction

THighTeeFunction

TLowTeeFunction

FunctionType_property


TMultiplyTeeFunction component Example

To set the period for TMultiplyTeeFunction you should use the FunctionType property of TChartSeries

To define a function series by code you should first create a new series for the function. The series may be of any type.

{ Set the function using the SetFunction method}.

Series1.SetFunction(TAddTeeFunction.Create(Self));

{You may then define the period for the function - here setting it to to 5}

Series1.FunctionType.Period:=5;

To undefine (delete) a function defined for the series use

Series1.SetFunction(nil);


TMultiplyTeeFunction Component

See also	Example

Unit

TeeFunci

Ancestor

TTeeFunction

Description

TMultiplyTeeFunction may be added to your project by Chart Editor at design time or at runtime using code. Default period for TMultiplyTeeFunction is 1 (By default, multiply will show the multiplication of all series at each axis point). Period is applicable only to the number of axis points, Period 1 = 1 axis point; period 2 = 2 axis points, etc..

Multiply will work with any number of input series as datasource. The Datasource is best defined using the Chart Editor.


TOHLCSeries Component

Properties	Methods	Events	Tasks

Unit

OHLChart

Ancestor

TCustomSeries

Description

TOHLCSeries is an abstract Series class that maintains lists for Open, Close, High and Low values. Its inmediate descendant is TCandleSeries, but can be used as the ancestor of any Financial Series type.


TOHLCSeries Methods
Methods

Key Methods

AddOHLC


TOHLCSeries Properties
Properties

Run-time only	Key Properties

CloseValues

DateValues

HighValues

LowValues

OpenValues


TOnGetLegendPos Type

See also	Example

Unit

TeEngine

Declaration

TOnGetLegendPos = Procedure( Sender : TCustomChart; Index : Longint; Var X,Y,XColor : Longint) of object;

Description

The TOnGetLegendPos type points to a method that notifies a TChart component that an event has occurred. It is used by the OnGetLegendPos Event


TOnGetLegendRect Type

See also	Example

Unit

TeEngine

Declaration

TOnGetLegendRect = Procedure( Sender:TCustomChart; Var Rect:TRect) of object;

Description

The TOnGetLegendRect type points to a method that notifies a TChart component that an event has occurred. It is used by the OnGetLegendRect Event.


TOnGetLegendText Type

See also	Example

Unit

TeEngin

Declaration

TOnGetLegendText = procedure(Sender:TCustomChart; LegendStyle:TLegendStyle; Index:Longint; Var LegendText:String);

Description

The TOnGetLegendText type points to a method that notifies a TChart component that an event has occurred. It is used by the OnGetLegendText event.


Total Property

See also	Example

Applies to

TChartValueListcomponent

Declaration

property Total : Double;

Description

.


TotalLegendItems Method

See also	Example

Applies to

TChartLegend component

Declaration

function TotalLegendItems:Longint;

Description

.


TPanningMode Type

See also	Example

Unit

Chart

Declaration

TPanningMode = (pmNone,pmHorizontal,pmVertical,pmBoth);

Description

TPanningMode defines the possible values of the AllowPanning property.

pmNone 	Deny scrolling.

pmHorizontal 	Allow only Horizontal Scrolling.

pmVertical 	Allow only Vertical Scrolling.

pmBoth 	Allow complete Horizontal and Vertical Scrolling.


TFunction Component
TTFunction Component

Properties	Methods	Events	Tasks

Unit

StatChar

Ancestor

Description

TTFunction is an abstract Series type.

While DataSource points are being inserted, TTFunction will trigger a calculation request when the last inserted point has overflowed the specified period.

TAverageTeeFunction is a TTeeFunction descendant.


TTFunction Properties
Properties

Run-time only	Key Properties

Period

PeriodStyle


TPeriodFunctionStyle Type

See also	Example

Unit

StatChar

Declaration

TPeriodFunctionStyle = (msNumPoints,msRange);

Description

TPeriodFunctionStyle only applies to TeeChart Pro

TPeriodFunctionStyle defines the possible values of the TTeeFunction.PeriodStyle property. TAverageTeeFunction and TMovingAverageFunction have a Period value. This is a numeric value that can be expressed either as a number of points or a horizontal range.

msNumPoints 	A number of points (for example: 20).

msRange 	A X value range (DateTime or not).

Example:

AverageSeries1.PeriodStyle := msRange ;

AverageSeries1.Period := DateTimeStep[ dtOneDay ] ;

That will construct a Series based on its DataSource Series. For every group of points within a Day, it will calculate its average.


TPieSeries Component

Properties	Methods	Events	Tasks

Unit

Series

Ancestor

TCircledSeries

Description

The TPieSeries component outputs all points drawing slices forming an ellipse.

Set the ParentChart property to the desired Chart component. Use the AddPie method to manually fill pie slices.

Right-click the component at design-time to access the DataSource Wizard Dialog to connect the Series to another Series or to any Table or Query component.

The PiePen property determine the kind of pen used to draw the slice frames.

The TChart.View3D and TChart.Chart3DPercent properties control the 3D pie appearance.

Set the UsePatterns property to True to fill the pie slices using brush patterns.

The Color3D property controls if the 3D pie region will be colored or not. The ShadowColor and Shadowed3D properties apply a shadow effect on pie 3D region.

The PieValues property can be used to access the pie values.

Please refer to TCircledSeries ancestor description for all common Series properties like Marks, Axis dependence, methods and events.


TPieSeries Methods
Methods

Key Methods

AddPie

AngleToPos

CalcClickedPie

Clicked

PointToAngle


TPieSeries Properties
Properties

Run-time only	Key Properties

Color3d

Dark3D

PiePen

PieValues

ShadowColor

Shadowed3d

UsePatterns


TPointSeries Component

Properties	Methods	Events	Tasks

Unit

Series

Ancestor

TCustomSeries

Description

The TPointSeries component outputs all points using the Pointer subcomponent properties.

Set the ParentChart property to the desired Chart component. Use the AddY or AddXY method to manually fill point values.

Right-click the component at design-time to access the DataSource Wizard Dialog to connect the Series to another Series or to any Table or Query component.

TPointSeries derives from TCustomSeries, which adds support for Series Pointers, Marks and click events.

The Pointer.Style property determines the kind of shape used to draw the points.

Use the Pointer.Brush property to change the point filling pattern. The Pointer.Pen property defines the kind of pen used to draw the point frames.

Point dimensions can be changed using the Pointer.HorizSize and Pointer.VertSize properties.

Please refer to TCustomSeries ancestor description for all common Series properties like Marks, Axis dependence, methods and events.


TPointSeries Events
Events

Key Events

OnClickPointer


TPointSeries Properties
Properties

Run-time only	Key Properties

Pointer

XValues

YValues


TPolarSeries Component

Properties	Methods	Events

Unit

TeePolar

Ancestor

TCircledSeries

Description

The TPolarSeries component outputs all points using polar coordinates instead of cartesian coordinates.

Each point is defined by an angle and a radius. Angle values correspond to X values and Radius correspond to Y values.

Circle grid lines are determined by the LeftAxis component properties, while radial grid lines are controlled by the BottomAxis component.

Set the ParentChart property to the desired Chart component. Use the AddPolar method to manually fill polar points.

Right-click the component at design-time to access the DataSource Wizard Dialog to connect the Series to another Series or to any Table or Query component.

The Pen and Pointer properties determine the Series formatting attributes.

The CloseCircle property controls if a line will be drawn between the first and last Series points.

Use the PiePen to change the circle frame appearance.

The AngleIncrement property defines the angle origin. By default it's zero, meaning angles start at right most circle coordinate.

The DrawRing method can be used to draw a circle at a specific Series value:

{ Draw a blue ring passing over the 3rd PolarSeries1 Point }

Chart1.Canvas.Brush.Style:=bsClear;

Chart1.Canvas.Pen.Color:=clBlue;

Chart1.Canvas.Pen.Width:= 2;

PolarSeries1.DrawRing( PolarSeries1.YValue[2] );

Please refer to TCircledSeries ancestor description for all common Series properties like Marks, Axis dependence, methods and events.


TPolarSeries Methods
Methods

Key Methods

AddPolar

DrawRing


TPolarSeries Properties
Properties

Run-time only	Key Properties

AngleIncrement

CloseCircle

Pen

PiePen

Pointer

RadiusIncrement

SeriesColor


TProcessRecordEvent Type

See also	Example

Unit

TeEngine

Declaration

TProcessRecordEvent = Procedure( Sender:TDBChart; DataSet:TDataSet) of object;

Description

The TProcessRecordEvent type points to a method that notifies a TDBChart component that an event has occurred. It is used by the OnProcessRecord Event.


TQRChart Component

Properties	Methods	Events	Tasks

Unit

QRTee

Ancestor

TQRCustomControl  (Quick Reports Custom Control)

Description

The TQRChart component derives from QuickReports TQRPrintTable component.

QuickReports is a native Delphi reporting tool Copyright by QuSoft, Norway. It's included in Borland Delphi 2.0.

You can contact QuSoft at www.qusoft.no

The TQRChart component links TChart or TDBChart components with QuickReports.

It's an interface between both environments to allow Charts to be embedded in report bands.

The TeePrintMethod property allows two operation modes: The qtmBitmap mode outputs Charts as bitmap pictures. This makes the Chart appear as it looks on the screen, but the printer output quality and report speed are far from good.

You can set TeePrintMethod property to qtmMetafile. This is much faster and gives much better output quality than bitmaps. Chart contents are sent to QuickReports in Windows metafile vector instructions. There are, however, some limitations and bugs in the Windows metafile subsystem.

Clipping does not work fine as it uses physical pixel coordinates instead of logical. Rotated fonts dimensions are very difficult to calculate in metafile mode. This makes rotated fonts overlap or leave too much space on axis and titles.

32bit Windows enhanced metafile (EMF) mode promises better results. These problems will be addressed in future TeeChart versions.

Please refer to QuickReports documentation and help file to know all details about creating reports.


TQRChart Properties
Properties

Run-time only	Key Properties

Chart

TeePrintMethod


TRSIFunction Component

Properties	Methods	Events	Tasks

Unit

Statchar

Ancestor

TMovingTeeFunction

Description

TRSIFunction only applies to TeeChart Pro

TRSIFunction is a TLineSeries derived component that calculates a percent value based on Financial data. TRSIFunction must be connected to a TOHLCSeries or any derived Series component (like TCandleSeries. Like a TMovingAverageFunction, RSI will calculate a new point Y value by using previous Period points.

The used formula is:

Add all Close prices greater than Open prices and divide by ocurrences (Ups).

Add all Close prices lower than Open prices and divide by ocurrences (Downs).

RSI := 100.0 - ( 100.0 / ( 1.0 + Abs( Ups / Downs ) ) )


TSeriesClick Type

See also	Example

Unit

TeEngine

Declaration

TSeriesClick = procedure(Sender:TChartSeries; ValueIndex: LongInt; Button: TMouseButton; Shift: TShiftState; X, Y: Integer);

Description

The TSeriesClick type points to a method that notifies a TChartSeries component that an event has occurred. It is used by the OnClick Event.


TSeriesClickPointerEvent Type

See also	Example

Unit

Series

Declaration

TSeriesClickPointerEvent = procedure(Sender: TCustomSeries; ValueIndex: LongInt; X, Y: Integer) of object;

Description

The TSeriesClickPointerEvent type points to a method that notifies a TChartSeries component that an event has occurred. It is used by the OnClickPointer Event.


TSeriesMarks Component

Properties	Methods	Events	Tasks

Unit

TeEngine

Description

Each Series have a Marks property. The Marks are like Delphi hints for each Series point. Marks can be Visible or not and have many custom formatting properties.


TSeriesMarks Properties
Properties

Run-time only	Key Properties

Arrow	Frame

ArrowLength	ParentSeries

BackColor	Style

Clip	Transparent

Font	Visible


TSeriesMarksStyle Type

See also	Example

Unit

TeEngine

Declaration

TSeriesMarksStyle = (smsValue, smsPercent, smsLabel, smsLabelPercent, smsLabelValue, smsLegend, smsPercentTotal, smsLabelPercentTotal, smsXValue);

Description

TSeriesMarksStyle defines the possible values of the TSeriesMarks.Style property. Series Marks will draw a textual representation of each point values.

smsValue	1234

smsPercent	12 %

smsLabel	Cars

smsLabelPercent	Cars 12 %

smsLabelValue	Cars 1234

smsLegend	(Depends on LegendTextStyle)

smsPercentTotal	12 % of 1234

smsLabelPercentTotal	Cars 12 % of 1234

smsXValue	{ 21/6/1996 }

You can choose both at design and runtime how this text will be constructed: LineSeries1.Marks.Style := smsPercent ;


TSeriesOnAfterAdd Type

See also	Example

Unit

TeEngine

Declaration

TSeriesOnAfterAdd = Procedure(Sender:TChartSeries; ValueIndex:Longint) of object;

Description

The TSeriesOnAfterAdd type points to a method that notifies a TChartSeries component that an event has occurred. It is used by the OnAfterAdd Event.


TSeriesOnBeforeAdd Type

See also	Example

Unit

TeEngine

Declaration

TSeriesOnBeforeAdd = Function(Sender: TChartSeries): Boolean of object;

Description

The TSeriesOnBeforeAdd type points to a method that notifies a TChartSeries component that an event has occurred. It is used by the OnBeforeAdd event.


TSeriesOnClear Type

See also	Example

Unit

TeEngine

Declaration

TSeriesOnClear = Procedure(Sender: TChartSeries) of object;

Description

The TSeriesOnClear type points to a method that notifies a TChartSeries component that an event has occurred. It is used by the OnClearValues Event.


TSeriesOnGetMarkText Type

See also	Example

Unit

TeEngine

Declaration

TSeriesOnGetMarkText = procedure ( Sender : TChartSeries ;  ValueIndex : Longint ;  Var MarkText : String )

Description

The TSeriesOnGetMarkText type points to a method that notifies a TChartSeries component that an event has occurred. It is used by the OnGetMarkText Event.


TSeriesPointer Component

Properties	Methods	Events	Tasks

Unit

Series

Description

Some Series have a Pointer property. Pointers are shape figures drawn on each Y point coordinates. You can set several properties to change the pointers appearance.


TSeriesPointer Methods
Methods

Key Methods

ChangeHorizSize

ChangeStyle

ChangeVertSize

Draw

DrawPointer

PrepareCanvas


TSeriesPointer Properties
Properties

Run-time only	Key Properties

Brush

Draw3d

HorizSize

InflateMargins

ParentSeries

Pen

Style

VertSize

Visible


TSeriesPointerStyle Type

See also	Example

Unit

Series

Declaration

TSeriesPointerStyle = (psRectangle, psCircle, psTriangle, psDownTriangle, psCross, psDiagCross, psStar, psDiamond, psSmallDot);

Description

TSeriesPointerStyle defines the possible values of the TSeriesPointer.Style property. This is the shape a Pointer has.

psRectangle

psCircle

psTriangle

psDownTriangle

psCross

psDiagCross

psStar

You can change the pointer Style both at design and runtime: PointSeries1.Pointer.Style := psTriangle ;


TSeriesRecalcOptions Type

See also	Example

Unit

TeEngine

Declaration

TSeriesRecalcOptions = set of (rOnDelete, rOnModify, rOnInsert, rOnClear);

Description

TSeriesRecalcOptions defines the possible values of the RecalcOptions property.


TSubtractTeeFunction component Example

To set the period for TSubtractTeeFunction you should use the FunctionType property of TChartSeries

To define a function series by code you should first create a new series for the function. The series may be of any type.

{ Set the function using the SetFunction method}.

Series1.SetFunction(TAddTeeFunction.Create(Self));

{You may then define the period for the function - here setting it to to 5}

Series1.FunctionType.Period:=5;

To undefine (delete) a function defined for the series use

Series1.SetFunction(nil);


TSubtractTeeFunction Component

See also	Example

Unit

TeeFunci

Ancestor

TTeeFunction

Description

TSubtractTeeFunction may be added to your project by Chart Editor at design time or at runtime using code. Default period for TSubtractTeeFunction is 1 (By default, subtract will show the subtraction of one series from another at each axis point). Period is applicable only to the number of axis points, Period 1 = 1 axis point; period 2 = 2 axis points, etc..

Subtract will only work with 2 input series. The first series in the Chart Editor list will subtract the 2nd series.


TSubtractTeeFunction Component See also
See Also

TAddTeeFunction

TMultiplyTeeFunction

TDivideTeeFunction

TAverageTeeFunction

THighTeeFunction

TLowTeeFunction

FunctionType_property


TSurfaceSeries Component

Properties	Methods	Events

Unit

TeeSurfa

Ancestor

TChartSeries

Description

The TSurfaceSeries component outputs all points as a 3 dimensions grid. You can control grid colors palette and line attributes.

Set the ParentChart property to the desired Chart component.

Points should be added manually to the Series by using either the AddXYZ method or the OnGetYValue event.

The NumXValues and NumZValues properties determine the grid dimensions. Currently, the Surface grid dimensions can't exceed 150 x 150 grid cells.

A Surface chart made of 150 x 150 grid cells takes a lot of computing time, while a 20 x 20 grid size redraws quite fast on a Pentium machine.

The Pen property determines the kind of pen used to draw Surface's grid lines.

Set the WireFrame property to True to draw transparent Surface's grids.

Surface point values are stored at XValues, YValues and ZValues properties.

The Brush property defines the pattern style used to fill Surface's grid cells.

The TimesZOrder property determines the ratio between Z scales and Chart depth in pixels.  The default value is 3 times the TChart.Chart3dPercent value.

You can use the OnGetYValue event as the function that calculates Y values for a given X,Z grid cell coordinate.

The OnGetColor event can be used to supply specific grid cell colors. The TSurfaceSeries has three color modes:

1) All cells with same color.

Set the UseColorRange and UsePalette properties to False.

2) Each cell color is calculated to be between two colors.

Set the UseColorRange property to True and set the desired StartColor and EndColor properties.

Each point Y value is used to calculate the corresponding cell color between the above two colors.

3) Each cell color is calculated from an internal color palette.

Set the UsePalette property to True and set the PaletteSteps property to the number of different color degrees.

The RedFactor, GreenFactor and BlueFactor run-time properties control how are the internal palette colors calculated.

The ClearPalette, AddPalette and Palette properties can be used to customize color ranges.

The CreateDefaultPalette restores the default internal color palette.

The GetSurfacePaletteColor function returns the color corresponding to a given Y value.

The GetXZValue function returns the stored Y value that corresponds to a given X,Y grid cell coordinates.

The ReCreateValues method can be used to force TSurfaceSeries to create again the grid and call again your OnGetYValue event to supply all Surface Y values.

The CreateValues method can be used to change the X and Z grid dimensions and refill again all Surface values.

Please refer to TChartSeries ancestor description for all common Series properties like Marks, Axis dependence, methods and events.


TSurfaceSeries Events
Events

Key Events

OnGetYValue

OnGetColor


TSurfaceSeries Methods
Methods

Key Methods

AddPalette

AddXYZ

ClearPalette

CreateDefaultPalette

CreateValues

GetSurfacePaletteColor

GetXZValue

ReCreateValues


TSurfaceSeries Properties
Properties

Run-time only	Key Properties

BlueFactor	NumZValues	TimesZOrder

Brush	Palette	UseColorRange

DotFrame	PaletteSteps	UsePalette

EndColor	Pen	WireFrame

GreenFactor	RedFactor	ZValue

NumXValues	StartColor	ZValues


TTeeBackImageMode Type

See also	Example

Unit

Chart

Declaration

TTeeBackImageMode = ( pbmStretch, pbmTile, pbmCenter);

Description

TTeeBackImageMode defines the possible values of the BackImageMode property.

pbmStretch :	The BackImage will be resized to fit Chart dimensions.

pbmTile :	The BackImage will be tiled.

pbmCenter :	The BackImage will not be resized.


TTeeFunction Component

Properties	Methods	Events	Tasks

Unit

StatChar

Ancestor

TComponent

Description

TTeeFunction only applies to TeeChart Pro

TTeeFunction is an abstract Series type.

While DataSource points are being inserted, TTeeFunction will trigger a calculation request when the last inserted point has overflowed the specified period.

TAverageTeeFunction is a TTeeFunction descendant.


TTeeFunction Properties
Properties

Run-time only	Key Properties

Period

PeriodStyle


TTeeQuickMethod Type

See also	Example

Unit

TeEngine

Declaration

TTeeQuickMethod = ( qtmBitmap, qtmMetafile );

Description

TTeeQuickMethod defines the possible values of the TeePrintMethod property.


TTypeFitting Type

See also	Example

Unit

TeEngine

Declaration

TTypeFitting = (cfPolynomial);

Description

TTypeFitting defines the possible values of the TypeFitting property.


TValueEvent Type

See also	Example

Unit

TeEngine

Declaration

TValueEvent = (veClear, veAdd, veDelete, veRefresh, veModify);

Description

Series notify the following events to their dependent Series:

veClear 	The Series have been emptied.

veAdd 	A new point has been appended.

veDelete 	A point has beed deleted.

veRefresh 	Series need to be refreshed (reconstructed).

This events are intended for Series developers.


TVertAxis Type

See also	Example

Unit

TeEngine

Declaration

TVertAxis = (aLeftAxis,aRightAxis);

Description

TVertAxis defines the possible values of the TChartSeries.VertAxis property. Most Series components have Horizontal and Vertical dependent axis. You can choose a given Series to have the Vertical Axis at Left or Right.

Default value: aLeftAxis

You can set the VertAxis property both at design and runtime:

LineSeries1.VertAxis := aRightAxis ;


 TVolumeSeries Component

Properties	Methods	Events	Tasks

Unit

CandleCh

Ancestor

TCustomSeries

Description

The TVolumeSeries outputs all points as a vertical thin line starting at the bottom of the Chart.

This Series can be used for example, to display Stock Market Volumes.

It is very similar to a Bar series, except it can not be stacked and that each point is a thin line instead of a bar.

Set the ParentChart property to the desired Chart component. Use the AddY or AddXY method to manually fill Volume points.

Right-click the component at design-time to access the DataSource Wizard Dialog to connect the Series to another Series or to any Table or Query component.

The VolumeValues property stores all point values.

Use the LinePen property to alter the default pen attributes.

Please refer to TCustomSeries ancestor description for all common Series properties like Marks, Axis dependence, methods and events.


TVolumeSeries Properties
Properties

Run-time only	Key Properties

VolumeValues

XValues


TeEngine Unit

The TeEngin unit contains the declarations for the following components and for the enumerated type associated with them. When you add a component declared in this unit to a form, the unit is automatically added to the uses clause of that form's unit. The following items are declared in the this unit:

Components

TChartAxis

TChartAxisTitle

TChartLegend

TChartPen

TChartSeries

TChartSeriesList

TChartTitle

TChartValueList

TSeriesMarks

Types

TAxisLabelStyle

TAxisOnGetLabel

TDateTimeStep

TeeDefaultCapacity

THorizAxis

TLegendStyle

TLegendTextStyle

TOnGetLegendText

TSeriesClick

TSeriesMarksStyle

TSeriesOnGetMarkText

TSeriesRecalcOptions

TValueEvent

TVertAxis

Routines

DaysInMonth

To see a listing of items declared in this unit including their declarations, use the ObjectBrower.


TeeChart Component Reference
Component Reference

Installation	Quick Start	TeeChart Pro Order Form	About..

The main TeeChart component is: TChart.

TChart is a placeholder for TChartSeries components. TChart is derived from TPanel component, and inherits all its functionality.

When you place a TChart component in a Delphi Form, you will see a standard TPanel with an upper title and a lower foot text.

Right click on the Chart to see the opening TeeChart menu where you can select the Chart editor alternatively double-click to directly call the Chart editor.

The Chart editor presents Chart configuration options and the TeeChart Gallery which contains access to all data series types. Data series types are subcomponents that can be accessed and manipulated independently of the Chart and are accessible across Charts.

For Database charts, you need to use: TDBChart

Place one or more series in the Chart and either connect to a DataSource or write your own code to populate the series.

Key palette components

 TChart

 TDBChart

 TQRChart


TeeAxisClickGap Global Variable

See also	Example

Unit

TeeProcs

Applies to

Global

Declaration

property TeeAxisClickGap : Longint;

Description

Maximum number of pixels from the Axis to the mouse cursor to consider the Axis clicked.


TeeChart Wizard

See also

TeeChart Wizard enables you to easily generate a form that displays data from an external InterBase, Paradox, dBase, or ORACLE database.

The TeeChart Wizard helps you create two types of Charts:

•	Non-database aware chart

•	Database aware chart

The tool automates such chart building tasks as:

•	Connecting the chart to Table and Query components

•	Offers a choice of data series type

•	Installs series in the Chart.


Gallery
TeeChart Gallery

See also

Description

The TeeChart Gallery contains a visual catalogue of all available Series types. You may access the Gallery via the Chart Editor.


Gallery See also
See Also

Series Unit


TeeChart Global Constants and Methods

See also	Example

Global Procedures

Procedure SwapLongInt(Var a, b : LongInt);

Procedure SwapDouble(Var a, b : Double);

These procedures interchange the "a" and "b" parameter values. You can use it in your applications.

Gradient Fill

procedure GradientFill(Canvas: TCanvas; Const Rect: TRect; top, bottom: TColor; Horizontal: Boolean);

The GradientFill method is used to fill a Screen area with multi-colored lines to obtain a nice shadow effect and coloured backgrounds. The Chart.Gradient component uses this method internally.

Global Functions

DaysInMonth

Function DaysInMonth(Year,Month);

This function returns the number of days that a given pair of Year and Month has. It is declared in TeEngine

ApplyDark

Function ApplyDark(Color: TColor; HowMuch: Byte) : TColor;

This function returns a darker color than the Color parameter. The RGB values of Color parameter are increased "HowMuch" units.

Function GetDefaultColor(t: Longint): TColor;

Returns the t th color in the default array palette.

Function MaxLong(a,b:Longint):Longint; returns max (> a , b)

Function MinLong(a,b:Longint):Longint; returns min (< a , b)

TeeChart Global Constants:

DateTimeStep

A global array of constants useful to define DateTime periods.

ChartMarkColor : Longint = $80FFFF

This is the default color for Series Marks rectangles. (Yellow)

PercentOf : String[10] = ' of '

Used to show " 35 % of 1234 " in Series Marks.


TeeChart Installation

Quick Start

To install TeeChart run the installation procedure included with the Beta documentation.


TeeChart Pro

TeeChart Pro order information

TeeChart Pro is a comprehensive charting tool aimed at those developers wishing to program with or make use of extended TeeChart functionality. TeeChart Pro has more series types, runtime toolbar, developer kit, 16 bit support for Delphi v1 and 32bit support for Delphi v2 and v3. TeeChart Pro includes the code for the full TeeChart libraries! - 100% source code !

The specification of TeeChart Pro:

100 % TeeChart Source code

All 100 % Native Delphi components

16 bit and 32 bit versions

Support for Delphi 1, 2 and 3.

39 units, 26 components

True OOP

Data aware

Zoom, scroll and real time

2D, 3D

11 standard series types

6 extended series types

Support series combination

Developer Custom Series guide

Statistical functions

Custom printing

Custom drawing

Royalty free

Small footprint

QuickReport integration

No flicker charts

Extensive demos

Runtime Chart Editor

Online help

Reference manual


TeeChart New 3 Upgrade
TeeChart version 3 / TeeChart Pro

TeeChart version 3 - New and improved!

TeeChart Pro has many extended features. It contains more series types, more predefined functions, a runtime Chart Editor and developer documentation. TeeChart Pro has a 16 bit version for Delphi version 1 and a 32 bit version for Delphi versions 2 and 3. TeeChart Pro ships with 100% of its own source code. For information on how to obtain TeeChart Pro follow the links in this help.

We hope you'll enjoy using TeeChart !!!

Thanks to All of You !


TeeChart Order Form
TeeChart Pro Order Form

About	Registration

If you would like to order TeeChart Pro please use the following order form.

********************************************

TeeChart - Pro v3.0    ORDER FORM

********************************************

 WWW: http://ourworld.compuserve.com/homepages/dberneda

Please mail me TeeChart-Pro v3.0 to this address:

Customer Information:

---------------------------------------------------------------

  Name..……………	:

  Company…………	:

  Address.………….	:

  City..………………	:

  State.……………..	:

  ZIP...……………..	:

  Country…………..	:

  Phone.……………	:

  FAX...…………….	:

  EMail.…………….	:

  Credit Card Information:

---------------------------------------------------------------

  Credit Card Type…....………	:

  Credit CardHolder Name…...	:

  Credit Card Number...………	:

  Credit Card Exp. Date………	:   /

  Order Product:

---------------------------------------------------------------

     Single License x  : @$99 / license  ………	:

     Shipping & Handling:

Post 1 copy (add per additional copy)	UPS 1 copy (add per additional copy)

Europe	$16	($8)	$35	($17.50)

USA	$20	($10)	$65	($32.50)

Other	$25	($12.50)	$65	($32.50)

(Any questions on non-standard specific shipping charges please contact us)

---------------------------------------------------------------

          T O T A L     : $

---------------------------------------------------------------

For purchases by bank transfer or cash on delivery please contact us for information.

FAX this Order Form to us at FAX NUMBER:  +34 3 454 29 39

  Or...

Send by Internet EMail to: teechart@redestb.es

  Or...

Send by postal mail to:

  TeeMach, SL.

  Gran Via 533

  08011 Barcelona, Catalonia

  Spain

---------------------------------------------------------------

TeeChart-Pro will be mailed to you as soon as possible.

You should expect to receive it in few days.

Please email us if want to download TeeChart-Pro from www.

---------------------------------------------------------------


TeeChart Quick Start

Installation

Please read the topics below they will guide you through basic steps of chart creation.

After you have installed the TeeChart components, open the TEEDEMO.DPR Demo project or start a new Form and place a Chart on it.

Create a new Data-Aware Chart and get values from a Table or Query

Create a new Chart and insert values MANUALLY

Learn more about TeeChart components


TeeChart Registration
TeeChart license and disclaimer

About

TeeChart is available for your evaluation. If you like TeeChart and wish to register and make use of the extended functionality of TeeChart Pro then you should refer to the order information for that product.

Disclaimer

The Author cannot and does not guarantee that any functions contained in the Software will meet your requirements, or that its operations will be error free.  The entire risk as to the Software performance or quality, or both, is solely with the user and not the Author.  You assume responsibility for the selection of the component to achieve your intended results, and for the installation, use, and results obtained from the Software.

The Author makes no warranty, either implied or expressed, including with- out limitation any warranty with respect to this Software documented here, its quality, performance, or fitness for a particular purpose. In no event shall the Author be liable to you for damages, whether direct or indirect, incidental, special, or consequential arising out the use of or any defect in the Software,  even if the Author has been advised of the possibility of such damages, or for any claim by any other party.

All other warranties of any kind, either express or implied, including but not limited to the implied warranties of merchantability and fitness for a particular purpose, are expressly excluded.


TeeChart Series Types

See also	Example

TeeChart Library includes the most typical Chart Series types.

Each type has its own specific properties and events to customize your Charts.

Most importantly you can derive new subcomponents from any Series type, thus creating any NEW Chart types.

TeeChart includes the following Chart Series types:

Standard:

 Line

 Area

 Point (scatter)

 Bar,Pyramid,Cilinder...

 Horizontal Bar,Pyramid,Cilinder...

 Pie

 Shapes

 Fast Line

 Arrows

Gantt

Bubble

Extended:

These series types are only available with TeeChart Pro:

 Candle  (both Stick and Bar)

 Volume

 3D Surface

Polar

 Error Bars

All Series are derived from the "pseudo-abstract" TChartSeries class.

TChartSeries hides all the logic complexity leaving the developer to code the "drawing" and "esthetic" parts of a given Series type.

See TTeeFunction for an outline description of available statistical functions.

Some advanced Series features include custom scaling and margining.

Other "pseudo-abstract" components are available for component developers:

Period

MovingPeriod


TeeCharHeight Method

See also	Example

Applies to

TChart, TDBChart components

Declaration

Procedure TeeCharHeight: Longint;

Description


TeeClipWhenMetafiling Global Variable

See also	Example

Unit

TeeProcs

Applies to

Global

Declaration

property TeeClipWhenMetafiling : Boolean;

Description

This property forces clipping when creating metafile charts.


TeeClipWhenMetafiling Global Variable See also
See Also

TeeClipWhenPrinting


TeeClipWhenPrinting Global Variable

See also	Example

Unit

TeeProcs

Applies to

Global

Declaration

property TeeClipWhenPrinting : Boolean;

Description

This property forces clipping when printing charts.


TeeClipWhenPrinting Global Variable See also
See Also

TeeClipWhenMetafiling


TeeDefaultCapacity Global Variable

See also	Example

Applies to

Global

Declaration

property TeeDefaultCapacity : Longint;

Description

Default 0

This global variable is the default capacity of all internal TList objects. See the Delphi help file regarding TList.Capacity property.

Setting it to a bigger number can increase speed when adding many points to Series components. TeeChart always uses this variable to initialize the TList.Capacity of all internal Lists.


TeeDefaultCapacity Global Variable See also
See Also

TChartValueList


TeeEraseBack Global Variable

See also	Example

Applies to

Global

Declaration

property TeeEraseBack : Boolean;

Description

Default True

The TeeEraseBack global variable determines if TeeChart will handle the Windows WM_ERASEBACK message. This messages forces TChart to fill the panel background before repainting.

Setting it to False prevents TeeChart to erase the panel background thus avoiding flickering when resizing Charts in Windows when full-window-drag is selected.

It affects all Chart components as it's a global variable.


TeeEraseBack Global Variable See also
See Also

TChart.BufferedDisplay


TeePolar Unit

The TeePolar unit contains the declarations for the following components and for the enumerated type associated with them. When you add a component declared in this unit to a form, the unit is automatically added to the uses clause of that form's unit. The following items are declared in the this unit:

Components

TPolarSeries

Types

Routines

To see a listing of items declared in this unit including their declarations, use the ObjectBrower.


TeePrintMethod Property

See also	Example

Applies to

TQRChart component

Declaration

property TeePrintMethod : TTeeQuickMethod;

Description

Default qtmMetafile

The TeePrintMethod property indicates the method used to display an embedded TChart or TDBChart component into a QuickReport Band component. When using the qtmMetafile mode, all drawing instructions are generated directly over the QuickReport Band. When using qtmBitmap, the whole Chart is outputted to an internal Bitmap and then copied to the QuickReport band. The qtmMetafile method guaranties better Printing and Screen resolution and it's faster in most situations.


TeePrintMethod See also
See Also

TChart.BufferedDisplay

TChart.TeeCreateMetafile

TChart.SaveToBitmap


TeeScrollKeyShift Global Variable

See also	Example

Unit

Chart

Applies to

All TeeChart components

Declaration

property TeeScrollKeyShift : TShiftState;

Description

Default Value: []

Keys that should be pressed to start scroll.

Warning: This is not a TChart property. It's a global variable.

For Windows users with swapped mouse buttons, this variable points to the opposite mouse button.


TeeScrollKeyShift Global Variable See also
See also

TeeZoomMouseButton

TeeZoomKeyShift

TChart.OnScroll


TeeScrollMouseButton Global Variable

See also	Example

Unit

Chart

Applies to

All TeeChart components

Declaration

property TeeScrollMouseButton : TMouseButton;

Description

Default Value: mbRight

The TeeScrollMouseButton global variable determines which of the mouse buttons will be used by TChart users at run-time to scroll chart contents.

By default it is assigned to the Right mouse button. You can change this behavior setting it to a different mouse button.

The other TeeZoomMouseButton global variable determines the mouse button used to zoom chart contents.

Never set the same mouse button for these two variables.

Warning: This is not a TChart property. It's a global variable.

For Windows users with swapped mouse buttons, this variable points to the opposite mouse button.


TeeScrollMouseButton Global Variable See also
See also

TeeZoomMouseButton

TChart.OnScroll


TeeShape Unit

The TeeShape unit contains the declarations for the following components and for the enumerated type associated with them. When you add a component declared in this unit to a form, the unit is automatically added to the uses clause of that form's unit. The following items are declared in the this unit:

Components

TChartShape

Types

TChartShapeStyle

Routines

To see a listing of items declared in this unit including their declarations, use the ObjectBrower.


TeeSurfa Unit

The TeeSurfa unit contains the declarations for the following components and for the enumerated type associated with them. When you add a component declared in this unit to a form, the unit is automatically added to the uses clause of that form's unit. The following items are declared in the this unit:

Components

TSurfaceSeries

Types

TChartSurfaceGetColor

TChartSurfaceGetY

Routines

To see a listing of items declared in this unit including their declarations, use the ObjectBrower.


TeeTextHeight Method

See also	Example

Applies to

TChart component

Declaration

function TeeTextHeight(Const St:String):Longint; virtual;

Description

The TeeTextHeight function returns the vertical size in pixels of the string "St" parameter. Is equivalent to calling Chart1.Canvas.TextHeight function, but performs additional Font measuring when using Charts in Metafile mode, so it's recomended to use this function instead of the standard Canvas.TextHeight function.


TeeTextHeight See also
See Also

TChart.TeeTextWidth

TChart.SaveToMetafile


TeeTextOut Example

This code displays a message at Chart1 center position:

{ This prepares the Font attributes (see FontCanvas method) }

Chart1.FontCanvas(Chart1.Title.Font);

{ This sets the Text background mode to Transparent }

SetBkMode( Chart1.Canvas.Handle, TRANSPARENT );

{ Now a 'Welcome!' message is displayed at Chart1 center }

Chart1.TeeTextOut( ( Chart1.ChartBounds.Left + Chart1.ChartBounds.Right ) div 2, (Chart1.ChartBounds.Top + Chart1.ChartBounds.Bottom ) div 2, 'Welcome!');


TeeTextOut Method

See also	Example

Applies to

TChart component

Declaration

procedure TeeTextOut(X,Y:Longint; Const St:String); virtual;

Description

The TeeTextOut method displays the "St" string parameter at the specified X Y screen coordinates. Text is outputted to the correct internal Canvas. It's equivalent to call the Chart.Canvas.TextOut method. The X and Y coordinates must be valid and fit inside the Chart.ChartBounds rectangle. It uses the current Chart.Canvas.Font attributes.


TeeTextOut See also
See Also

TChart.Canvas

TChart.ChartBounds

TChart.ChartRect

TChart.ClipPoints

TChart.FontCanvas


TeeTextWidth Method

See also	Example

Applies to

TChart component

Declaration

function TeeTextWidth(Const St:String):Longint; virtual;

Description

The TeeTextWidth function returns the horizontal size in pixels of the string "St" parameter. Is equivalent to calling Chart1.Canvas.TextWidth function, but performs additional Font measuring when using Charts in Metafile mode, so it's recomended to use this function instead of the standard Canvas.TextWidth function.


TeeTextWidth See also
See Also

TChart.TeeTextHeight

TChart.SaveToMetafile


TeeZoomKeyShift Global Variable

See also	Example

Unit

Chart

Applies to

All TeeChart components

Declaration

property TeeZoomMouseButton : TShiftState;

Description

Default Value: []

Key that should be pressed to start zoom. This variable allows control of which mousebutton and keyboard combination should be applied to start zoom.

Warning: This is not a TChart property. It's a global variable.

For Windows users with swapped mouse buttons, this variable points to the opposite mouse button.


TeeZoomKeyShift Global Variable See also
See Also

TChart.OnZoom

TChart.UndoZoom

TeeScrollMouseButton

TeeScrollKeyShift


TeeZoomMouseButton Global Variable

See also	Example

Unit

Chart

Applies to

All TeeChart components

Declaration

property TeeZoomMouseButton : TMouseButton;

Description

Default Value: mbLeft

The TeeZoomMouseButton global variable determines which of the mouse buttons will be used by TChart users at run-time to apply zoom.

By default it is assigned to the Left mouse button. You can change this behavior setting it to a different mouse button.

The other TeeScrollMouseButton global variable determines the mouse button used to scroll chart contents.

Never set the same mouse button for these two variables.

Warning: This is not a TChart property. It's a global variable.

For Windows users with swapped mouse buttons, this variable points to the opposite mouse button.


TeeZoomMouseButton Global Variable See also
See Also

TChart.OnZoom

TChart.UndoZoom

TeeScrollMouseButton


TempValue Property

See also	Example

Applies to

TChartValueList component

Declaration

property TempValue : Double;

Description

Run-time only.

The TempValue property is a special internal property used when adding values from one Series to another or when adding values to a Series with more than "X" and "Y" values, such as TBubbleSeries which has "Radius" values as well.


Text property (TChartTitle)
Text Property

See also	Example

Applies to

TChartTitle component

Declaration

property Text : TStrings;

Description

The Text property determines the text that appears at a Chart Title or Foot. You can add or change text using the standard Delphi TStrings object methods:


Text property (TChartTitle) Example
Text property Example

You can add or change text using the standard Delphi TStrings object methods:

Chart1.Title.Clear;

Chart1.Title.Add('Hello');

Chart1.Title.Add('World');


Text property (TChartTitle) See also
See Also

TChart.Title


Text Property (TChartShape)

See also	Example

Applies to

TChartShape component

Declaration

property Text : TStrings;

Description

.


TextStyle Property

See also	Example

Applies to

TChartLegend component

Declaration

property TextStyle : TLegendTextStyle;

Description

Default Value: ltsLeftValue

The TextStyle property indicates how Legend text items will be formatted.

ltsPlain shows the point Label only.

ltsLeftValue shows the point Value and the point Label.

ltsRightValue shows the point Label and the point Value.

ltsLeftPercent shows the percent the point represents and the point Label.

ltsRightPercent shows the point Label and the percent the points represent.

ltsXValue shows the point's X value. It applies only to Series with X (horizontal) values.

Values are pre-formatted using the Series ValueFormat property. Percents are pre-formatted using the Series PercentFormat property.

You can also use the TChart.OnGetLegendText event to supply customized Legend texts.


TextStyle property Example

These are examples of different Legend's TextStyle values:

ltsPlain            Summer

ltsLeftValue        1234 Summer

ltsRightValue       Summer 1234

ltsLeftPercent      5.1 % Summer

ltsRightPercent     Summer 5.1 %

**ltsXValue           4321

**Applies only to Series with X values. See TChartSeries.AddXY method.


TextStyle property See also
See Also

TChartLegend.LegendStyle

TChartSeries.ValueFormat

TChartSeries.PercentFormat

TChart.OnGetLegendText


TickInnerLength Property

See also	Example

Applies to

TChartAxis component

Declaration

property TickInnerLength : Integer;

Description

Default Value: 0

The TickInnerLength property defines the length in pixels of Axis ticks drawn inside Chart boundaries.

Inner ticks are hidden by default. Set it to a value greater than zero to show the inner Axis Ticks.

Use the TickInner property to determine the Pen used to draw them.

You can combine TChartAxis.Ticks, TChartAxis.MinorTicks and TChartAxis.TicksInner at same time.


TickInnerLength See also
See Also

TChartAxis.TicksInner

TChartAxis.Ticks

TChartAxis.MinorTicks


TickLength Property

See also	Example

Applies to

TChartAxis component component

Declaration

property TickLength : Integer;

Description

Default Value: 4

The TickLength property defines the length of Axis Ticks in logical pixels.

Use the Ticks Pen property to change pen attributes.

Set it to zero to hide Axis Ticks.

You can combine TChartAxis.Ticks, TChartAxis.MinorTicks and TChartAxis.TicksInner at same time.


TickLength property See also
See Also

TChartAxis.TicksInner

TChartAxis.Ticks

TChartAxis.MinorTicks

TChartAxis.TickOnLabelsOnly


TickOnLabelsOnly Property

See also	Example

Applies to

TChartAxis component component

Declaration

property TickOnLabelsOnly : Boolean;

Description

Default True

This property sets the Axis Ticks and Axis Grid to be drawn only to coincide at Labels. Otherwise they will be drawn at all axis increment positions. When the Axis LabelsSeparation property is greater than 0 (default 10), Axis increases the increment property to avoid Axis Label overlap.


TickOnLabelsOnly property See also
See Also

TChartAxis.TicksInner

TChartAxis.Ticks

TChartAxis.MinorTicks

TChartAxis.LabelsSeparation


Ticks Property

See also	Example

Applies to

TChartAxis component

Declaration

property Ticks : TChartPen;

Description

The Ticks property determines the kind of Pen used to draw Axis marks along the Axis line.

Ticks position is calculated based on Axis.Increment, Axis.LabelsSeparation and Axis.LabelStyle properties.

There are three kind of ticks available:  Ticks, MinorTicks and TicksInner.

You can show or hide any of them of have all of them Visible.

The TickLength property defines the length of Axis Ticks in logical pixels.


Ticks property See also
See Also

TChartAxis.Increment

TChartAxis.MinorTicks

TChartAxis.TickLength

TChartAxis.TicksInner


TicksInner Property

See also	Example

Applies to

TChartAxis component

Declaration

property TicksInner : TChartPen;

Description

The TicksInner property determines the kind of Pen used to draw Axis marks along the Axis line. This is the same Ticks property does but lines are drawn inside Chart boundaries instead.

TicksInner position is calculated based on Axis.Increment, Axis.LabelsSeparation and Axis.LabelStyle properties.

There are three kind of ticks available:  Ticks, MinorTicks and TicksInner.

You can show or hide any of them of have all of them Visible.

The TickInnerLength property defines the length of Axis TicksInner in logical pixels.


TicksInner property See also
See Also

TChartAxis.Increment

TChartAxis.MinorTicks

TChartAxis.TickLength

TChartAxis.Ticks


TimesZOrder Property

See also	Example

Applies to

TSurfaceSeries component

Declaration

property TimesZOrder : Longint

Description

Default 3

The TimesZOrder property defines how big the Z axis (the depth axis) will be respect Surface's width and height. By default, the Surface depth will be 3 times the LineSeries depth.


TimesZOrder See also
See Also

TChartSeries.ZOrder

TChart.View3D


Title Example

LineSeries1.Title:='Total Population';


Title Property (TChart)

See also	Example

Applies to

TChart component

Declaration

property Title : TChartTitle;

Description

The Title property defines the Text and formatting properties to be drawn at Top Chart side. Use the Text property to enter the desired Title lines, set Visible to True and change the Font, Frame and Brush properties. Use the Alignment property to control text output position.


Title Property (TChartAxis)

See also	Example

Applies to

TChartAxis component

Declaration

property Title : TChartAxisTitle;

Description

The Title property is a TChartAxis sub-component. It contains all properties for Axis Titles.

Axis Titles are a string of text drawed near Axis.

Use the Caption property to specify Axis Title text. Set the Font and Angle properties to desired format.


Title Property (TChartSeries)
Title Property

See also	Example

Applies to

TChartSeries component

Declaration

property Title : String;

Description

By default, Title is empty.

Every TChartSeries has a Title property of type String. The Title property is used in TChart.Legend to draw the series descriptions. If Title is empty, then the Series component Name will be used to draw the legend. Setting Title both at design time and runtime will force the Chart to repaint.


Title property (TChartAxis) See also
See Also

TChartAxis.Labels

TChart.Title

TChart.Foot

TChart.Legend


Title property (TChartTitle) See also
See Also

TChart.Foot

TChartTitle.Text


TitleRect Property

See also	Example

Applies to

TChartTitle component

Declaration

property TitleRect : TRect;

Description

.


TitleSize Example

{50 pixels separation}

Chart1.TopAxis.TitleSize := 50 ;


TitleSize Property

See also	Example

Applies to

TChartAxis component

Declaration

property TitleSize : Integer;

Description

The TitleSize property is 0 by default.

Therefore the space between the Axis Title and the Chart will be automatically calculated based on the Axis Title Width and Height. You can set this property both at design or runtime.


TopAxis Property

See also	Example

Applies to

TChart component

Declaration

property TopAxis : TChartAxis;

Description

The TopAxis property determines the Labels and formatting attributes of Top Chart side. It also controls where Series points will be placed.

Every TChart component has four TChartAxis: Left, Top, Right and Bottom.

The Top is pre-defined to be:

Horizontal := True ;

OtherSide  := True ;

Refer to TChartAxis help topic for a complete description.


TopAxis property See also
See Also

TChart

TChartAxis

TChart.BottomAxis

TChart.LeftAxis

TChart.RightAxis


TopPos Property

See also	Example

Applies to

TChartLegend component

Declaration

property TopPos : Integer;

Description

Default Value: 10

The TopPos property specifies the Legend's top position in percent of total chart height.

It's used when TChartLegend.Alignment is laLeft or laRight only. For laTop or laBottom Legend alignments, you can use the Chart's MarginTop and MarginBottom properties.

The TChart.OnGetLegendRect event can be used to supply specific Legend position and dimensions.


TopPos property See also
See Also

TChart.OnGetLegendRect

TChartLegend.HorizMargin

TChartLegend.VertMargin


TotalABS Property

See also	Example

Applies to

TChartValueList component

Declaration

property TotalABS : Double;

Description

Run-time and read only.

The TotalABS property returns the sum of all values in the list. The values are first converted to their absolute value.

TPieSeries, for example, uses this property to calculate the percent each Pie slice represents.

See TChartValueList.MaxValue property for more information.


Transparent Property
Transparent Property (TSeriesMarks)

See also	Example

Applies to

TSeriesMarks component

Declaration

property Transparent : Boolean;

Description

Default Value: False

The Transparent property controls if Series Marks background will be filled or not.


Transparent Property (TChartShape)

See also	Example

Applies to

TChartShape component

Declaration

property Transparent : Boolean;

Description

Default : False


Transparent property See also
See Also

TSeriesMarks.BackColor


TypeFitting Property

See also	Example

Applies to

TCurveFittingFunction component

Declaration

property TypeFitting : TTypeFitting;

Description

Default Value: cfPolynomial

The TypeFitting property specifies the method used by TCurveFittingFunction to calculate their point values. Currently only one fitting method is used:  cfPolynomial

cfPolynomial means TCurveFittingFunction will solve a linear equation system having as input all DataSource points.

Then, for each DataSource X coordinate a new Y value will be obtained by applying the resulting polynomy coefficients.


TypeFitting property See also
See Also

TChartSeries.DataSource


UnClipRectangle Method

See also	Example

Applies to

TChart, TDBChart components

Declaration

Procedure UnClipRectangle;

Description


UndoZoom Method

See also	Example

Applies to

TChart, TDBChart components

Declaration

procedure UndoZoom ;

Description

The Chart.UndoZoom method will rescale the Chart Axis to their Maximum and Minimum values.Each Axis "depends" on one or more Series components, so Axis values will depend on their associated Series Maximum and Minimum values. UndoZoom also restores any runtime Scrolling.


UndoZoom See also
See Also

Chart Zoom

Chart Scrolling and Panning


UpCloseColor Example

You can change both at design or runtime the color values:

CandleSeries2.UpCloseColor   := clGreen ;

CandleSeries2.DownCloseColor := clYellow ;

That will force to repaint the Chart component containing CandleSeries2.


UpCloseColor Property

See also	Example

Applies to

TCandleSeries component

Declaration

property UpCloseColor : TColor;

Description

By default, UpCloseColor is clWhite and DownCloseColor is clRed.

Each Candle will be filled with a different color depending its Open and Close values.

If Open value is greater than Close value, then the selected color will be the UpCloseColor color property.

If Close value is greater or equal than Open value, then the selected color will be the DownCloseColor color property.


UseColorRange Example

This code will create a gradient color palette from Green to Blue:

SurfaceSeries1.StartColor := clGreen ;

SurfaceSeries1.EndColor := clBlue ;

SurfaceSeries1.UseColorRange := True ;


UseColorRange Property

See also	Example

Applies to

TSurfaceSeries component

Declaration

property UseColorRange : Boolean

Description

Default True

When True, the UseColorRange property indicates that Surface polygons will be filled with a gradient color palette. The Palette is defined with two colors: StartColor and EndColor. When both UseColorRange and UsePalette are False, all Surface polygons are filled with Surface's SeriesColor color.


UseColorRange See also
See Also

TSurfaceSeries.StartColor

TSurfaceSeries.EndColor

TSurfaceSeries.PaletteSteps

TSurfaceSeries.UsePalette


UsePalette Example

This fills the Surface polygons with a multi-color palette:

SurfaceSeries1.UsePalette := True ;


UsePalette Property

See also	Example

Applies to

TSurfaceSeries component

Declaration

property UsePalette : Boolean

Description

Default False

The UsePalette property indicates that Surface polygons will be filled with a multi-color palette. The PaletteSteps property determines the number of entries in the palette. The RedFactor, GreenFactor and BlueFactor properties define the color proportion when creating the palette. The formula used to build colors is:

Procedure TSurfaceSeries.CreateDefaultPalette(NumSteps:Longint);

Const Delta=127.0;

var t:Longint;

tmp,Scale,ScaleValue:Double;

Begin

ClearPalette;

FPalette.Capacity:=NumSteps+1;

Scale:=pi/NumSteps;

ScaleValue:=(YValues.MaxValue-YValues.MinValue)/NumSteps;

for t:=1 to NumSteps do

begin

tmp:=Scale*t;

AddPalette(YValues.MinValue+ScaleValue*t, RGB( Trunc(Delta * (Sin(tmp/RedFactor)+1)) , Trunc(Delta * (Sin(tmp/GreenFactor)+1)), Trunc(Delta * (Cos(tmp/BlueFactor)+1))));

end;

end;


UsePalette See also
See Also

TSurfaceSeries.PaletteSteps

TSurfaceSeries.RedFactor

TSurfaceSeries.GreenFactor

TSurfaceSeries.BlueFactor


UsePatterns Property

See also	Example

Applies to

TPieSeries component

Declaration

property UsePatterns : Boolean

Description

Default False

The UsePatterns property indicates, when True, that Pie Sectors will be filled using different Brush pattern styles. There are 6 different pattern styles.


UsePatterns See also
See Also

TChart.SetBrushCanvas

TChartSeries.ValueColor

PatternPalette global constant

GetDefaultPattern global function


UseYOrigin Property

See also	Example

Applies to

TCustomBarSeries component

Declaration

property UseYOrigin : Boolean;

Description

Default Value: True

The UseYOrigin property defines if Bars will be bottom aligned to the YOrigin property value.

When False, the minimum of all Bar values is used as the Bar origins value.

When True, the YOrigin property is used as the start point for Bars.


UseYOrigin property See also
See Also

TCustomBarSeries.YOrigin


Value Property

See also	Example

Applies to

TChartValueList component

Declaration

property Value[ Index:Longint ] : Double;

Description

Run-time only.

The Value array property holds all values in the list. The Series component repaints whenever values are changed. You can use the Value property to retrieve or change values:


Value property Example

This code changes the 6th series point value to 25:

LineSeries1.YValues.Value[ 5 ] := 25 ;

LineSeries1.Repaint;

This code is equivalent:

LineSeries1.YValues[ 5 ] := 25 ;

LineSeries1.Repaint;

This code too (repaints automatically):

LineSeries1.YValue[ 5 ] := 25 ;


Value property See also
See Also

TChartSeries.AddY

TChartSeries.Delete


ValueColor Example

You can change by coding the point's color. The following code will change the (25+1)th point color to clGreen.

LineSeries1.ValueColor[ 25 ] := clGreen ;

Or...

The following code will change all negative values to be red and the positive ones to be blue.

LineSeries1.ColorEachPoint := True;

for t := 0 to LineSeries1.Count - 1 do

if LineSeries1.YValue[ t ] < 0 then

LineSeries1.ValueColor[ t ] := clRed

else

LineSeries1.ValueColor[ t ] := clBlue;

That can be also done in most Series types.


ValueColor Property

See also	Example

Applies to

TChartSeries component

Declaration

property ValueColor[Index:Longint]:TColor

Description

The TChartSeries ValueColor property is an array of TColor values. Each color value corresponds to a different point in the Series.


ValueFormat Example

Chart1.LeftAxis.AxisValuesFormat := '###0.0###';

See Delphi help under FormatFloat Function for complete details.


ValueFormat Property

See also	Example

Applies to

TChartAxis, TChartSeries components

Declaration

property ValueFormat : String;

Description

ValueFormat is a standard Delphi formatting string specifier.

Chart Axis uses it to draw the axis labels.

Chart Series uses it to draw the Marks.


ValueList Example

TBubbleSeries component has a 3rd ValueList: RadiusValues

This "extra" ValueList is the same as:

BubbleSeries.ValueList[ 2 ]


ValueList Property

See also	Example

Applies to

TChartSeries component

Declaration

property ValueList[Index:Longint] : TChartValueList

Description

All Series have at least 2 (two) ValueList's:

XValues (the 0 index ValueList)

YValues (the 1 index ValueList)

You dont need normally to use ValueList directly. Series that have more than 2 ValueList's normally "publish" the new ValueLists for you to access them as properties.


ValueMarkText Property

See also	Example

Applies to

TChartSeries component

Declaration

property ValueMarkText[Index:Longint]:String

Desciption

Returns the String representation of a Index point used to draw the Mark.


ValueSource Example

Being Quantity, a former numeric Field Name in Table1.

LineSeries1.DataSource := Table1 ;

LineSeries1.YValues.ValueSource := 'Quantity' ;

Case 2. A Chart Series is connected to another Chart Series:

If the Series which owns this ValueList is attached to a TChart (or a TDBChart), and if the Series.DataSource property is any TChartSeries component, then the ValueSource property must refer to an existing TChartValueList Name in the underlying TChartSeries.

Example:

LineSeries1.DataSource:=BubbleSerie2;

LineSeries1.YValues.ValueSource:='Y';

Being Y, the BubbleSeries2.YValues.Name.

ASSUMPTIONS:

Changing the ValueSource property both at design or runtime, will force the Series to fill again its values from the specified DataSource.

This must be specially considered when the DataSource Series property is a database TTable or TQuery or TClientDataset, because maybe it takes a long time to retrieve all records.

If the dataset is closed, the automatic record retrieving will be performed later on, when the dataset is opened again.


ValueSource Property

See also	Example

Applies to

TChartValueList component

Declaration

property ValueSource : String;

Description

Each Chart Value List has a ValueSource property. You can set this string property to different kind of values:

Case 1. A Chart Series is connected to a database source:

If the Series that owns this ValueList is attached to a TDBChart, and the Series.DataSource property is a TTable, TQuery, TClientDataset or any TDataSet component which provides database records, then the ValueSource property must refer to an existing numeric, date, time or datetime Field Name in the underlying dataset.

Example:

LineSeries1.DataSource := Table1 ;

LineSeries1.YValues.ValueSource := 'Quantity' ;

Being Quantity, a former numeric Field Name in Table1.

Case 2. A Chart Series is connected to another Chart Series:

If the Series which owns this ValueList is attached to a TChart (or a TDBChart), and if the Series.DataSource property is any TChartSeries component, then the ValueSource property must refer to an existing TChartValueList Name in the underlying TChartSeries.

Example:

LineSeries1.DataSource:=BubbleSerie2;

LineSeries1.YValues.ValueSource:='Y';

Being Y, the BubbleSeries2.YValues.Name.

ASSUMPTIONS:

Changing the ValueSource property both at design or runtime, will force the Series to fill again its values from the specified DataSource.

This must be specially considered when the DataSource Series property is a database TTable or TQuery or TClientDataset, because maybe it takes a long time to retrieve all records.

If the dataset is closed, the automatic record retrieving will be performed later on, when the dataset is opened again.


ValuesListCount Method

See also	Example

Applies to

TChartSeries component

Declaration

function ValuesListCount:Longint;

Description

This Function returns the number of ValueLists for the Series. Normally, ValuesListCount is 2 ( XValues and YValues ) but there are some Series that have more ValuesList:

BubbleSeries has 3 ValuesLists (X, Y and Radius).

CandleSeries has 4 ValuesList (Open, Close, High and Low).

GanttSeries has 3 ValuesList (Y, Start and End).


Variables list

See also

Description

This table lists the different input variables permitted by each Series type. Some variables, such as Label fields, are optional.

SERIES TYPE	DATASOURCE PROPERTIES

Basic

Line	XValues, YValues, XLabel

Fast Line	XValues, YValues, XLabel

Bar	XValues, YValues (called Bar), XLabel

Area	XValues, YValues, XLabel

Point	Xvalues, YValues, XLabel

Pie	PieValues, XLabel

Arrow	StartXValues, StartYValues, XLabel, EndXValues, EndYValues

Bubble	Xvalues, YValues, XLabel, RadiusValues

Gantt	StartValues, EndValues, AY (Y axis level), AXLabel (Label optionally shown on 	Y-axis or as mark)

Shape	X0 (Top), Y0 (Bottom), X1 (Left), Y1 (Right)

Extended	(Only available with TeeChart Pro)

Candle	OpenValues, CloseValues, HighValues, LowValues, DateValues

Error Bar	XValues, YValues, XLabel, ErrorValues

Polar	XValues, YValues

3D Surface	XValues, YValues, ZValues

Volume	XValues, YValues (VolumeValues), XLabel


Variables list See also
See Also

Series unit


VertAxis Example

BubbleSeries1.VertAxis := aRightAxis ;


VertAxis Property

See also	Example

Applies to

TChartSeries component

Declaration

property VertAxis : TVertAxis

Description

The VertAxis property is of type: TVertAxis. It means by which Vertical Axis ( Left or Right axis ) will be the Series vertically scaled. You can change the desired Vertical Axis both at design and runtime:


VertAxis See also
See Also

TChartSeries.HorizAxis


VertMargin Property

See also	Example

Applies to

TChartLegend component

Declaration

property VertMargin : Integer

Description

Default 0

The VertMargin property determines the amount of pixels that Legend will reduce Chart rectangle. The Legend.ResizeChart property must be True and Legend.Alignment property must be laTop or laBottom. When 0, the corresponding Chart margin property is used to determine the amount of pixels for margins (Chart.MarginTop for laTop Legend.alignment and Chart.MarginBottom for laBottom Legend.Alignment).


VertMargin See also
See Also

TChart.MarginBottom

TChart.MarginTop

TChartLegend.Alignment

TChartLegend.HorizMargin

TChartLegend.ResizeChart


VertSize Property (TSeriesPointer)
VertSize Property

See also	Example

Applies to

TSeriesPointer component

Declaration

property VertSize : Integer;

Description

Default Value: 4

The VertSize property specifies the Series Pointer height in logical pixels.

Series that derive from TPointSeries usually override the HorizSize and VertSize properties.

For example, TBubbleSeries uses the Radius property to determine the correct HorizSize and VertSize, so these properties have no effect in that Series.


VertSize property (TSeriesPointer) See also
See Also

TSeriesPointer

TSeriesPointer.HorizSize


View3D Property

See also	Example

Applies to

TChart, TDBChart components

Declaration

property View3d : Boolean

Description

Default value: True

View3D will draw each Series simulating a 3D effect.You can control the 3D proportion by using Chart.Chart3DPercent property. Chart.View3DWalls depends on View3D property.


View3DWalls Property

See also	Example

Applies to

TChart, TDBChart components

Declaration

property View3dWalls : Boolean

Description

Default value: True

View3DWalls will draw Left and Bottom "walls" to simulate 3D effect. You can control the 3D Wall proportion by using Chart.Chart3DPercent property. Chart.View3D controls (on/off) View3DWalls property.


Visible Property (TChartAxis)
Visible Property

See also	Example

Applies to

TChartAxis component

Declaration

property Visible : Boolean

Description

This boolean property Shows / Hides the Axis lines, ticks, grids, labels and title. You can change it both at design and runtime:


Visible Property (TChartGradient)

See also	Example

Applies to

TChartGradient component

Declaration

property Visible : Boolean;

Description

Default False

The Visible determines whether the gradient fill appears on screen.


Visible Property (TChartLegend)

See also	Example

Applies to

TChartLegend component

Declaration

property Visible : Boolean;

Description

Default Value: True

The Visible property determines if Chart Legend will be displayed or not.


Visible Property (TChartPen)

See also	Example

Applies to

TChartPen component

Declaration

property Visible : Boolean;

Description

The Visible property determines if the pen will draw lines or not.

For example, TChart.Frame can be hidden by setting it's Visible property to False:

Chart1.Frame.Visible:=False;


Visible Property (TChartTitle)

See also	Example

Applies to

TChartTitle component

Declaration

property Visible : Boolean;

Description

The Visible property controls if Chart Title or Foot will be displayed or not. When False, Chart dimensions grow to fit all available space.


Visible Property (TSeriesMarks)

See also	Example

Applies to

TSeriesMarks component

Declaration

property Visible : Boolean;

Description

The Visible property controls if Series Marks will be displayed or not.


Visible Property (TSeriesPointer)
Visible Property

See also	Example

Applies to

TSeriesPointer component

Declaration

property Visible : Boolean;

Description

The Visible property controls if Series pointers will be displayed or not.

When using a TPointSeries (or any Series component derived from TPointSeries), setting Visible to False will not display anything.

Pointers can be useful with TLineSeries or TAreaSeries.

When points are Visible, an extra margins are applied to the four chart axis (Left, Right, Top and Bottom).

This is to make points just at axis limits to be shown.

You can deactivate this extra margins by setting the TSeriesPointer.InflateMargins property to False.

Points are filled using TSeriesPointer.Brush property.


Visible property (TChartAxis) Example
Visible Example

Chart1.BottomAxis.Visible := False ;


Visible property (TChartAxis) See also
See Also

Chart.AxisVisible


Visible property (TChartGradient) Example

This code creates a gradient fill:

Chart1.Gradient.Visible := True ;

Chart1.Gradient.StartColor := clYellow ;

Chart1.Gradient.EndColor := clBlue ;

Chart1.Gradient.Direction := gdLeftRight ;


Visible property (TChartGradient) See also
See Also

TChartGradient.Direction

TChartGradient.EndColor

TChartGradient.StartColor


Visible property (TSeriesMarks) See also
See Also

TSeriesMarks.Transparent

TSeriesMarks.BackColor


Visible property (TSeriesPointer) See also
See Also

TSeriesPointer.InflateMargins

TSeriesPointer.Brush


VisibleCount Method

See also	Example

Applies to

TChartSeries component

Declaration

function VisibleCount : Longint;

Description

This function returns the number of Visible points in the Series. These are the points which X coordinate is between the Minimum and Maximum horizontal Axis range. To iterate, you need to know the FirstValueIndex and LastValueIndex points.


VolumeValues Property

See also	Example

Applies to

TVolumeSeries component

Declaration

property VolumeValues : TChartValueList;

Description

The VolumeValues property is used to store all Stock Volume quantities in TVolumeSeries.

It's equivalent to YValues property.

You can access VolumeValues in the same way you can access XValues or YValues properties.


VolumeValues property Example
VolumeValues Example

{ This code sums all Volume values:  }

Var

tmpSum : Double;

tmpSum:=0;

for t:= 0 to VolumeSeries1.Count - 1 do

begin

tmpSum:=tmpSum + VolumeSeries1.VolumeValues[ t ] ;

end;

ShowMessage('Total Sum: '+FloatToStr( tmpSum ) );


WarningHighColor Method

See also	Example

Applies to

TChart component

Declaration

procedure WarningHighColor;

Description

This method is used internally at design-time to inform the developer that some property values will look much better on Screen if the video card mode is set to 16k colors or True Color 24bit / 32bit. It calls the Chart.IsScreenHighColor function and, when False, pops up a message dialog notifying the developer. You can use this method at run-time in your own applications if you need the same video checking.


WarningHighColor method See also
See Also

TChart.IsScreenHighColor


Weight Property

See also	Example

Applies to

TExpAverageFunction component

Declaration

property Weight : Double;

Description

Default Value: 0.2

The Weight property specifies the factor to use to calculate Exponential Average values.

The following formula is used to calculate each TExpAverageFunction points:

Y:= YValue[ValueIndex-1]*(1.0-Weight)+YValue[ValueIndex]*Weight


Weighted Property (TAverageTeeFunction)
Weighted Property

See also	Example

Applies to

TAverageTeeFunction component

Declaration

property Weighted : Boolean;

Description

Default Value: False

The Weighted property determines the kind of formula used to calculate the Average points values.

Given this three points:

Point 0 :    x 1    y 4

Point 1 :    x 2    y 5

point 2 :    x 3    y 9

When Weighted property is False, the arithmetic average is used:

4 + 5 + 9 = 18

18 div 3  =  6     <------- 6 is the mean

When True, each value is multiplied by it's X coordinate:

( 1 * 4 ) + ( 2 * 5 ) + ( 3 * 9 ) = 41

Then the sum is divided by the sumatory of all X values:

41 div ( 1 + 2 + 3 ) = 6.833333333....


Weighted Property (TMovingAverageFunction)

See also	Example

Applies to

TMovingAverageFunction component

Declaration

property Weighted : Boolean;

Description

Default Value: False

The Weighted property controls if the moving average points will be calculated using or not the corresponding X point values.

When False, (the default), the average is calculated as the simple sum of Y values divided by the number of points.

When True, each Y value is first multiplied by it's X value and the total sum is divided by the sum of all X point values.


Weighted property (TAverageTeeFunction) See also
See Also

TTeeFunction.Period

TTeeFunction.PeriodStyle


Weighted property (TMovingAverageFunction) See also
See Also

TMovingAverageFunction.Centered


Welcome to TeeChart
Welcome to TeeChart !

The 100% Native Data-Aware Charting Component Library for Borland Delphi*

TeeChart Version 3

Installation	Component Reference

Quick Start

License & Disclaimer	About TeeChart...

Whats available in TeeChart Pro.

TeeChart Pro Order Form

Copyright © 1995-1997 David Berneda. All rights reserved.

* Borland Delphi copyright of Borland International, Inc.

Help file credits!


Width Property (TChartPen)

See also	Example

Applies to

TChartPen component

Declaration

property Width : Integer;

Description

The Width property determines the width of lines the pen draws.

Warning:

When drawing to Screen, the Width is expressed in pixels. When drawing to Printer or to Metafile canvases, the Pen Width will be converted based on TChart.PrintResolution property.

Windows GDI has a special Width value of "0", that corresponds to the minimum pen width the drawing device supports.


Width3D Example

This code draws an horizontal "frame":

With Chart1,Canvas do

begin

MoveTo( ChartRect.Left  , ChartRect.Bottom - 10 ) ;

LineTo( ChartRect.Right , ChartRect.Bottom - 10 ) ;

LineTo( ChartRect.Right + Width3D  , ChartRect.Bottom - 10 - Height3D ) ;

end;


Width3D Property

See also	Example

Applies to

TChart component

Declaration

property Width3D : Longint;

Description

Run-time and read only. The Width3D property determines the width in pixels of the Chart 3D effect. The Chart.View3D property should be True. It equals zero if Chart.View3D is False. It changes when changing the Chart.Chart3DPercent property.


Width3D See also
See Also

TChart.Height3D

TChart.SeriesHeight3D

TChart.SeriesWidth3D


WireFrame Example

SurfaceSeries1.WireFrame := True ;

SurfaceSeries1.Pen.Color := clRed ;


WireFrame Property

See also	Example

Applies to

TSurfaceSeries component

Declaration

property WireFrame : Boolean;

Description

Default False

When True, Surface polygons aren't filled. If Surface.Pen.Visible is True (default), Surface points are displayed as a "grid" or "wireframe", with lines connecting them.


WireFrame See also
See Also

TSurfaceSeries.Pen


X0, Y0, X1, Y1 Properties

See also	Example

Applies to

TChartShape component

Declaration

property X0 : Double;

property Y0 : Double;

property X1 : Double;

property Y1 : Double;

Description

These properties define the Top - Left and Bottom - Right coordinates of the englobing TChartShape rectangle.

The values should be expressed in Axis coordinates.

You can convert from Screen pixel coordinates to values and vice-versa using several TChart and TChartSeries methods like XScreenToValue and YScreenToValue.


X0, Y0, X1, Y1 property See also
See Also

TChartShape.Style

TChartSeries.XScreenToValue

TChartSeries.YScreenToValue


XLabel Property

See also	Example

Applies to

TChartSeries component

Declaration

property XLabel[Index:Longint] : String;

Description

This array property contains the horizontal Series Labels. You can access the individual Label strings by using the Index parameter. Index must be between 0 and Count - 1 If you modify an XLabel, the Series will be repainted to reflect any changes.


XLabelText Method

See also	Example

Applies to

TChart, TDBChart components

Declaration

function XLabelText ( ASeries : TChartSeries ; ValueIndex : Longint ) : String ;

Description

This function returns the Series.XLabel text of the ValueIndexth Series point.


XLabels Example

If a LineSeries is made of pairs of points, each with X and Y values, you can choose to have or to not have a corresponding horizontal label for each point X values.

This will add a new point to LineSeries1 with 3.5 (X) and 5.2 (Y) values, no associated horizontal label and red color.

This point will be inserted in its horizontal  position.

LineSeries1.AddXY( 3.5 , 5.2, '', clRed);

You can also have the opposite case:

This will append a new point to LineSeries1, with an YValue of 5.2 and a 'Manhattan' horizontal label in yellow color.

LineSeries1.AddY( 5.2 , 'Manhattan', clYellow);

Last case is applicable to Bar Series and Pie Series.


XLabels Property

See also	Example

Applies to

TChartSeries component

Declaration

property XLabels : TList;

Description

The XLabels property is a string list used to store the corresponding horizontal labels for a specific chart Series at runtime. Its use is optional. You can have both XValues and XLabels or a single one only. How axis labels and Series Marks will be displayed depends on its own respective style properties.


XLabels See also
See Also

Series XLabelsSource property


XLabelsSource Property

See also	Example

Applies to

TChartSeries component

Declaration

property XLabelsSource : String;

Description

The XLabelsSource is the name of a DataSet field. DataSet can be a TTable, TQuery, TClientDataset or any other TDataSet derived component. This is the database field that contains the point Labels. Valid Field types are all that have a valid AsString method. This property is optional. If no LabelsSource specified, Series XLabels will be empty.


XLabelsSource See also
See Also

Series XLabels


XRadius Property

See also	Example

Applies to

TCircledSeries component

Declaration

property XRadius : Longint

Description

Run-time and read only. The XRadius property returns the exact ellipse's radius horizontal size in pixels. The ellipse XRadius and YRadius can be set to a fixed number of pixels by using the CircledSeries.CustomXRadius and CustomYRadius. The CircledSeries.Circled property controls if both radius must be proportional to the Screen X/Y ratio.


XRadius See also
See Also

TCircledSeries.YRadius

TCircledSeries.CustomXRadius

TCircledSeries.CustomYRadius


XScreenToValue Example

You can, for example, use this function to know the Value where the user mouse-clicked:

Procedure TForm1.Chart1OnClick( ... x,y ... ) ;

Begin

ShowMessage('You clicked at: '+FloatToStr( LineSeries1.XScreenToValue(x) ));

end ;


XScreenToValue Method

See also	Example

Applies to

TChartSeries component

Declaration

function XScreenToValue(ScreenPos:Longint):Double;

Description

This function returns the numeric Value that corresponds to the specified Horizontal Screen coordinate. The resulting Value is based on the Series.GetHorizAxis


XScreenToValue See also
See Also

YScreenToValue


XValue Property

See also	Example

Applies to

TChartSeries component

Declaration

property XValue[Index:Longint] : Double;

Description

XValue array property returns the Index value in the XValues List


XValueToText Method

See also	Example

Applies to

TChartSeries component

Declaration

function XValueToText( Const AValue : Double ) : String;

Description

The XValueToText function returns the formatted text representation of the specified AValue parameter.

The AValue parameter is considered to be an horizontal X coordinate.

It returns the text string corresponding to an hypothetic horizontal Axis Label for that value.

It calls the corresponding horizontal axis LabelValue function.


XValueToText method See also
See Also

TChartAxis.LabelValue

TChartSeries.YValueToText


XValues Example

Many things can be done with the XValues property.

For example, you can modify its values (thus forcing the Chart to repaint):

This will change the 35th point horizontal value to 10.

LineSeries1.XValues.Value[ 35 ] := 10 ;

Or, if contains DateTime XValues...

LineSeries1.YValues.Value[ 35 ] := EncodeDate( 1995 , 4 , 13 );

Or...

With LineSeries1.XValues do Value[ 35 ] := Value[ 35 ] + 1 ;


XValues Property

See also	Example

Applies to

TChartSeries component

Declaration

property XValues:TChartValueList

Description

By default, any TChartSeries has an XValues property. This is the TChartValueList where the  point values will be stored at runtime. Also by default, XValues is a Public property. Some derived Series publish it: TLineSeries, TBarSeries, TPointSeries, etc. Some others publish it with another, more friendly name: TGanttSeries.StartValues, etc.

WARNING:

You CAN NOT Delete, Clear or Add values DIRECTLY. You need to call the TChartSeries equivalent methods to do this.


XValues See also
See Also

TChartValueList

YValues


XYStyle Property

See also	Example

Applies to

TChartShape component

Declaration

property XYStyle : TChartShapeXYStyle;

Description

Default : xysAxis

Can be xysAxis or xysPixels.


Y Percents Explanation

See also	Example

For each Series point, its corresponding  value is calculated with the following formula:

percent:=100.0*value/TotalABS;

Being TotalABS the sum of all point's  values.

Example:

Having the following point values (either vertical, horizontal):

5, 8, -3, 6, -1, 0

The first point percentual value is:

100.0 * 5 / 23  --> 21.739 %

Where 23 equals: 5 + 8 + abs(-3) + 6 + abs(-1) + 0


YOrigin Property

See also	Example

Applies to

TCustomBarSeries component

Declaration

property YOrigin : Double;

Description

Default Value: 0

The YOrigin property determines the axis value used as a common bottom for all Bar points.

The UseYOrigin property must be True (the default) to use the YOrigin property.

Bars with a value bigger than YOrigin are drawn in one direction and Bars with a lower value are drawn in the opposite direction.

This applies both to TBarSeries and THorizBarSeries components.


YOrigin property See also
See Also

TCustomBarSeries.UseYOrigin


YRadius Property

See also	Example

Applies to

TCircledSeries component

Declaration

property YRadius : Longint

Description

Run-time and read only. The YRadius property returns the exact ellipse's radius vertical size in pixels. The ellipse XRadius and YRadius can be set to a fixed number of pixels by using the CircledSeries.CustomXRadius and CustomYRadius. The CircledSeries.Circled property controls if both radius must be proportional to the Screen X/Y ratio.


YRadius See also
See Also

TCircledSeries.XRadius

TCircledSeries.CustomXRadius

TCircledSeries.CustomYRadius


YScreenToValue Example

You can, for example, use this function to set the Axis Minimum Value to a specific current Y Screen coordinate.

LineSeries1.GetVertAxis.Minimum := LineSeries1.YScreenToValue ( 123 );


YScreenToValue Method

See also	Example

Applies to

TChartSeries component

Declaration

function YScreenToValue(ScreenPos:Longint) : Double;

Description

This function returns the numeric Value that corresponds to the specified Vertical Screen coordinate. The resulting Value is based on the Series.GetVertAxis


YScreenToValue See also
See Also

XScreenToValue


YValue Property

See also	Example

Applies to

TChartSeries component

Declaration

property YValue[Index:Longint]:Double

Description

YValue array property returns the Index value in the YValues List


YValueToText Method

See also	Example

Applies to

TChartSeries component

Declaration

function YValueToText( Const AValue : Double ) : String;

Description

The YValueToText function returns the formatted text representation of the specified AValue parameter.

The AValue parameter is considered to be a vertical Y coordinate.

It returns the text string corresponding to an hypothetic vertical Axis Label for that value.

It calls the corresponding vertical axis LabelValue function.


YValueToText method See also
See Also

TChartSeries.XValueToText

TChartAxis.LabelValue


YValues Property (TChartSeries)

See also	Example

Applies to

TChartSeries component

Declaration

property YValues : TChartValueList;

Description

By default, any TChartSeries has an YValues property. This is the TChartValueList where the point values will be stored at runtime. Also by default, YValues is a Public property.

Some derived Series publish it: TLineSeries, TBarSeries, TPointSeries, and some others publish it with another, more friendly name: TPieSeries.PieValues, etc.

WARNING:

You CAN'T Delete, Clear or Add values DIRECTLY. You need to call the TChartSeries equivalent methods to do it.


YValues property (TChartSeries) Example

Many things can be done with the YValues property.

For example, you can modify its values (thus forcing the Chart to repaint):

LineSeries1.YValues.Value[35]:=10;

That will change the 35th point vertical value to 10

Or...

With LineSeries1.YValues

Value[35] := Value[35]+1;

Or, if contains DateTime YValues...

LineSeries1.YValues.Value[35] := EncodeDate(1995,4,13);


YValues property (TChartSeries) See also
See Also

Assigning a DataSource to YValues.

XValues


ZOrder Property

See also	Example

Applies to

TChartSeries component

Declaration

property ZOrder : LongInt;

Description

Read-only and run time.

The ZOrder property returns at which position along the depth axis the Series is drawn.

It's valid only when TChart.View3D property is True and when there's more than one Series in same chart.

You can't alter the ZOrder property directly. If you want a different order you need to use the TChart.SeriesList property instead.

The ZOrder property is calculated for each Series just before the Chart is drawn.

The TChart.ApplyZOrder property controls if Series will be assigned a different Z position or not. When False, all Series are drawn at same Z plane.

The TChart.MaxZOrder property returns the highest of all Series ZOrder values.

See the "LastValu.PAS" example unit for a demo of ZOrder.


ZOrder property See also
See Also

TChart.ApplyZOrder

TChart.SeriesUp

TChart.MaxZOrder


ZValue Example

This code increases Surface Y values with Z values less than 5:

for t := 0 to SurfaceSeries1.Count-1 do

begin

if SurfaceSeries1.ZValue[ t ] < 5 then

SurfaceSeries1.YValue[ t ] := SurfaceSeries1.YValue[ t ] + 1 ;

end;


ZValue Property

See also	Example

Applies to

TSurfaceSeries component

Declaration

property ZValue[ Index : Longint ] : Double

Description

Run-time only. The ZValue array property lets you access a specific Surface's point Z value. Z values are kept in the ZValues list property. You can access Z values using the Index parameter.


ZValue See also
See Also

TSurfaceSeries.ZValues


ZValues Property

See also	Example

Applies to

TSurfaceSeries component

Declaration

property ZValues : TChartValueList

Description

The ZValues property contains the Surface points Z values. ZValues is a standard TChartValueList object. You should use the ZValue property to change Z values.


ZValues See also
See Also

TSurfaceSeries.ZValue

TChartValueList


ZoomPercent Example

This sets AnimatedZoom to True, performs a Zoom In and a Zoom Out:

Chart1.AnimatedZoom:=True;

Chart1.ZoomPercent( 125 );  { Zoom IN 125% }

Chart1.ZoomPercent( 75 );   { Zoom OUT 75% }


ZoomPercent Method

See also	Example

Applies to

TChart component

Declaration

procedure ZoomPercent( Const  PercentZoom : Double );

Description

The Chart.ZoomPercent method applies the specified PercentZoom Zoom In/Out to the current Axis scales. When PercentZoom is greater than 100%, Zoom Out is performed. When PercentZoom is lower than 100%, Zoom In is performed. The AnimatedZoom property controls if Zoom is done directly in only one step or by multiple zooms thus giving an animation effect.


ZoomPercent See also
See Also

TChart.AllowZoom

TChart.AnimatedZoom

TChart.AnimatedZoomSteps

TChart.OnUndoZoom

TChart.OnZoom

TChart.ZoomRect

TChart.Zoomed

TChartAxis.SetMinMax


ZoomRect Method

See also	Example

Applies to

TChart component

Declaration

procedure ZoomRect(Const Rect : TRect);

Description

The ZoomRect method does zoom on Chart contents. The Rect parameter defines the pixel rectangle coordinates of the chart area to be zoomed. Calling this method is similar to manually drawing a zoom box at run-time by dragging the left mouse button.

You can perform a zoom in by specifying a Rect parameter enclosed on Chart dimensions, and zoom out by specifying a bigger rectangle parameter.

Zoom in example:

Chart1.ZoomRect( Rect( 5,5,Chart1.Width-5,Chart1.Height-5 ) );

Zoom out example:

Chart1.ZoomRect( Rect( -5,-5,Chart1.Width+5,Chart1.Height+5 ) );


ZoomRect method See also
See Also

TChart.AllowZoom

TChart.AnimatedZoom

TChart.AnimatedZoomSteps

TChart.OnUndoZoom

TChart.OnZoom

TChart.UndoZoom

TChart.Zoomed

TChart.ZoomPercent

TeeZoomMouseButton global variable

AnimatedZoomFactor global variable


Zoomed Property

See also	Example

Applies to

TChart component

Declaration

property Zoomed : Boolean;

Description

Run-time only.

The Zoomed property determines if Chart axis scales do not fit all Chart points.

It is set to True when users's apply zoom or scroll to the Chart using the mouse at run-time.

The UndoZoom method sets the Zoomed property to False and resets the axis scales to fit all Series points.

The default value is True, meaning no zoom or scroll has been applied to the chart after it has been displayed for first time.


Zoomed Property See also
See Also

TChart.OnScroll

TChart.OnZoom

TChart.UndoZoom

TChart.ZoomPercent

TChart.ZoomRect


clTeeColor Color Value
clTeeColor Color Value Property

See also	Example

Applies to

TChart, TDBChart components

Declaration

Const clTeeColor = clScrollBar;

Description

Most Color properties in TeeChart component, accept the clTeeColor constant value. That is equal to Delphi clScrollBar (or -1, in numeric).

It is a very important feature to have clTeeColor:

When adding new points to a Chart Series, specifying clTeeColor as the point color, it will make TeeChart assigns a different color to each point. (See TChartSeries.ColorEachPoint property for more information).

When attaching new series to any Chart, having the TChartSeries.SerieColor property to clTeeColor it will make TeeChart assigns a different color to each Series.

Some Series types allow clTeeColor in their Pen and Brushes properties, thus forcing to use the actual point color instead of the Pen or Brush assigned color.